1 /*-------------------------------------------------------------------------
4 * prototypes for utility.c.
7 * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/tcop/utility.h
12 *-------------------------------------------------------------------------
17 #include "tcop/tcopprot.h"
21 PROCESS_UTILITY_TOPLEVEL, /* toplevel interactive command */
22 PROCESS_UTILITY_QUERY, /* a complete query, but not toplevel */
23 PROCESS_UTILITY_SUBCOMMAND /* a portion of a query */
24 } ProcessUtilityContext;
26 /* Hook for plugins to get control in ProcessUtility() */
27 typedef void (*ProcessUtility_hook_type) (Node *parsetree,
28 const char *queryString, ProcessUtilityContext context,
30 DestReceiver *dest, char *completionTag);
31 extern PGDLLIMPORT ProcessUtility_hook_type ProcessUtility_hook;
33 extern void ProcessUtility(Node *parsetree, const char *queryString,
34 ProcessUtilityContext context, ParamListInfo params,
35 DestReceiver *dest, char *completionTag);
36 extern void standard_ProcessUtility(Node *parsetree, const char *queryString,
37 ProcessUtilityContext context, ParamListInfo params,
38 DestReceiver *dest, char *completionTag);
40 extern bool UtilityReturnsTuples(Node *parsetree);
42 extern TupleDesc UtilityTupleDescriptor(Node *parsetree);
44 extern Query *UtilityContainsQuery(Node *parsetree);
46 extern const char *CreateCommandTag(Node *parsetree);
48 extern LogStmtLevel GetCommandLogLevel(Node *parsetree);
50 extern bool CommandIsReadOnly(Node *parsetree);
52 #endif /* UTILITY_H */