/* Hook for plugin to get control in ExecCheckPermissions() */
ExecutorCheckPerms_hook_type ExecutorCheckPerms_hook = NULL;
-/*
- * Check that the query ID is set, which is something that happens only
- * if compute_query_id is enabled (or a module forced it), if track_activities
- * is enabled, and if a client provided a query string to map with the query
- * ID computed from it.
- */
-#define EXEC_CHECK_QUERY_ID \
-do { \
- Assert(!IsQueryIdEnabled() || !pgstat_track_activities || \
- !debug_query_string || pgstat_get_my_query_id() != 0); \
-} while(0)
-
/* decls for local routines only used within this module */
static void InitPlan(QueryDesc *queryDesc, int eflags);
static void CheckValidRowMarkRel(Relation rel, RowMarkType markType);
ScanDirection direction, uint64 count,
bool execute_once)
{
- /* If enabled, the query ID should be set. */
- EXEC_CHECK_QUERY_ID;
-
if (ExecutorRun_hook)
(*ExecutorRun_hook) (queryDesc, direction, count, execute_once);
else
void
ExecutorFinish(QueryDesc *queryDesc)
{
- /* If enabled, the query ID should be set. */
- EXEC_CHECK_QUERY_ID;
-
if (ExecutorFinish_hook)
(*ExecutorFinish_hook) (queryDesc);
else
void
ExecutorEnd(QueryDesc *queryDesc)
{
- /* If enabled, the query ID should be set. */
- EXEC_CHECK_QUERY_ID;
-
if (ExecutorEnd_hook)
(*ExecutorEnd_hook) (queryDesc);
else