diff options
| author | Pavan Deolasee | 2014-10-31 07:41:38 +0000 |
|---|---|---|
| committer | Pavan Deolasee | 2015-04-15 05:46:38 +0000 |
| commit | 3e4346857d73841373b3424147e104a58802f8f3 (patch) | |
| tree | a4c1622ef4f7be72c408eeaf4bd039cffc29d209 /src/backend/parser | |
| parent | e8a3eea32e7b353754842100020dde8c244cbb16 (diff) | |
Allow pg_stat_statements to work with XL
XL uses a post-post-analyze hook for it's internal purposes. But this overrides
any existing hooks, including that of pg_stat_statements. Setup things so that
the previous hook gets called appropriately
Diffstat (limited to 'src/backend/parser')
| -rw-r--r-- | src/backend/parser/analyze.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 85feefdfce..c7befc1ba4 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -2545,6 +2545,11 @@ transformExecDirectStmt(ParseState *pstate, ExecDirectStmt *stmt) if (!is_local) result->utilityStmt = (Node *) step; + /* + * Reset the queryId since the caller would do that anyways. + */ + result->queryId = 0; + return result; } @@ -2900,6 +2905,8 @@ applyLockingClause(Query *qry, Index rtindex, } #ifdef XCP +post_parse_analyze_hook_type prev_ParseAnalyze_callback; + /* * Check if the query contains references to any pg_catalog tables that should * be remapped to storm_catalog. The list is obtained from the @@ -2908,6 +2915,8 @@ applyLockingClause(Query *qry, Index rtindex, void ParseAnalyze_callback(ParseState *pstate, Query *query) { + if (prev_ParseAnalyze_callback) + prev_ParseAnalyze_callback(pstate, query); ParseAnalyze_rtable_walk(query->rtable); } |
