---------------------------------------------------------------- * ExecutorStart * * This routine must be called at the beginning of any execution of any * query plan * * Takes a QueryDesc previously created by CreateQueryDesc (which is separate * only because some places use QueryDescs for utility commands). The tupDesc * field of the QueryDesc is filled in to describe the tuples that
| 226 | * ---------------------------------------------------------------- |
| 227 | */ |
| 228 | void |
| 229 | ExecutorStart(QueryDesc *queryDesc, int eflags) |
| 230 | { |
| 231 | /* |
| 232 | * In some cases (e.g. an EXECUTE statement) a query execution will skip |
| 233 | * parse analysis, which means that the query_id won't be reported. Note |
| 234 | * that it's harmless to report the query_id multiple time, as the call |
| 235 | * will be ignored if the top level query_id has already been reported. |
| 236 | */ |
| 237 | pgstat_report_query_id(queryDesc->plannedstmt->queryId, false); |
| 238 | |
| 239 | if (ExecutorStart_hook) |
| 240 | (*ExecutorStart_hook) (queryDesc, eflags); |
| 241 | else |
| 242 | standard_ExecutorStart(queryDesc, eflags); |
| 243 | } |
| 244 | |
| 245 | void |
| 246 | standard_ExecutorStart(QueryDesc *queryDesc, int eflags) |
no test coverage detected