summaryrefslogtreecommitdiff
path: root/contrib/sepgsql/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sepgsql/hooks.c')
-rw-r--r--contrib/sepgsql/hooks.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/contrib/sepgsql/hooks.c b/contrib/sepgsql/hooks.c
index 4119322238..dadf99e74b 100644
--- a/contrib/sepgsql/hooks.c
+++ b/contrib/sepgsql/hooks.c
@@ -4,7 +4,7 @@
*
* Entrypoints of the hooks in PostgreSQL, and dispatches the callbacks.
*
- * Copyright (c) 2010-2016, PostgreSQL Global Development Group
+ * Copyright (c) 2010-2017, PostgreSQL Global Development Group
*
* -------------------------------------------------------------------------
*/
@@ -22,6 +22,7 @@
#include "miscadmin.h"
#include "tcop/utility.h"
#include "utils/guc.h"
+#include "utils/queryenvironment.h"
#include "sepgsql.h"
@@ -297,16 +298,18 @@ sepgsql_exec_check_perms(List *rangeTabls, bool abort)
* break whole of the things if nefarious user would use.
*/
static void
-sepgsql_utility_command(Node *parsetree,
+sepgsql_utility_command(PlannedStmt *pstmt,
const char *queryString,
ProcessUtilityContext context,
ParamListInfo params,
+ QueryEnvironment *queryEnv,
DestReceiver *dest,
#ifdef PGXC
bool sentToRemote,
#endif /* PGXC */
char *completionTag)
{
+ Node *parsetree = pstmt->utilityStmt;
sepgsql_context_info_t saved_context_info = sepgsql_context_info;
ListCell *cell;
@@ -365,20 +368,16 @@ sepgsql_utility_command(Node *parsetree,
}
if (next_ProcessUtility_hook)
- (*next_ProcessUtility_hook) (parsetree, queryString,
- context, params,
+ (*next_ProcessUtility_hook) (pstmt, queryString,
+ context, params, queryEnv,
dest,
-#ifdef PGXC
sentToRemote,
-#endif
completionTag);
else
- standard_ProcessUtility(parsetree, queryString,
- context, params,
+ standard_ProcessUtility(pstmt, queryString,
+ context, params, queryEnv,
dest,
-#ifdef PGXC
sentToRemote,
-#endif
completionTag);
}
PG_CATCH();