mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Editorialize a bit on new ProcessUtility() API.
Choose a saner ordering of parameters (adding a new input param after the output params seemed a bit random), update the function's header comment to match reality (cmon folks, is this really that hard?), get rid of useless and sloppily-defined distinction between PROCESS_UTILITY_SUBCOMMAND and PROCESS_UTILITY_GENERATED.
This commit is contained in:
@@ -20,23 +20,22 @@ typedef enum
|
||||
{
|
||||
PROCESS_UTILITY_TOPLEVEL, /* toplevel interactive command */
|
||||
PROCESS_UTILITY_QUERY, /* a complete query, but not toplevel */
|
||||
PROCESS_UTILITY_SUBCOMMAND, /* a piece of a query */
|
||||
PROCESS_UTILITY_GENERATED /* internally generated node query node */
|
||||
PROCESS_UTILITY_SUBCOMMAND /* a portion of a query */
|
||||
} ProcessUtilityContext;
|
||||
|
||||
/* Hook for plugins to get control in ProcessUtility() */
|
||||
typedef void (*ProcessUtility_hook_type) (Node *parsetree,
|
||||
const char *queryString, ParamListInfo params,
|
||||
DestReceiver *dest, char *completionTag,
|
||||
ProcessUtilityContext context);
|
||||
const char *queryString, ProcessUtilityContext context,
|
||||
ParamListInfo params,
|
||||
DestReceiver *dest, char *completionTag);
|
||||
extern PGDLLIMPORT ProcessUtility_hook_type ProcessUtility_hook;
|
||||
|
||||
extern void ProcessUtility(Node *parsetree, const char *queryString,
|
||||
ParamListInfo params, DestReceiver *dest, char *completionTag,
|
||||
ProcessUtilityContext context);
|
||||
ProcessUtilityContext context, ParamListInfo params,
|
||||
DestReceiver *dest, char *completionTag);
|
||||
extern void standard_ProcessUtility(Node *parsetree, const char *queryString,
|
||||
ParamListInfo params, DestReceiver *dest,
|
||||
char *completionTag, ProcessUtilityContext context);
|
||||
ProcessUtilityContext context, ParamListInfo params,
|
||||
DestReceiver *dest, char *completionTag);
|
||||
|
||||
extern bool UtilityReturnsTuples(Node *parsetree);
|
||||
|
||||
|
Reference in New Issue
Block a user