diff options
| author | Tom Lane | 2013-04-28 04:18:45 +0000 |
|---|---|---|
| committer | Tom Lane | 2013-04-28 04:18:45 +0000 |
| commit | f8db76e875099e5e49f5cd729a673e84c0b0471b (patch) | |
| tree | 162e43ab4a10fbeef78201e9adc87c433fe9d197 /src/include/tcop | |
| parent | 5525e6c40bbda351a19b48317eba0f79aa32e447 (diff) | |
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.
Diffstat (limited to 'src/include/tcop')
| -rw-r--r-- | src/include/tcop/utility.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/include/tcop/utility.h b/src/include/tcop/utility.h index 0697678979a..9864447b726 100644 --- a/src/include/tcop/utility.h +++ b/src/include/tcop/utility.h @@ -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); |
