Header And Logo

PostgreSQL
| The world's most advanced open source database.

utility.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * utility.h
00004  *    prototypes for utility.c.
00005  *
00006  *
00007  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00008  * Portions Copyright (c) 1994, Regents of the University of California
00009  *
00010  * src/include/tcop/utility.h
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef UTILITY_H
00015 #define UTILITY_H
00016 
00017 #include "tcop/tcopprot.h"
00018 
00019 typedef enum
00020 {
00021     PROCESS_UTILITY_TOPLEVEL,       /* toplevel interactive command */
00022     PROCESS_UTILITY_QUERY,          /* a complete query, but not toplevel */
00023     PROCESS_UTILITY_SUBCOMMAND      /* a portion of a query */
00024 } ProcessUtilityContext;
00025 
00026 /* Hook for plugins to get control in ProcessUtility() */
00027 typedef void (*ProcessUtility_hook_type) (Node *parsetree,
00028               const char *queryString, ProcessUtilityContext context,
00029               ParamListInfo params,
00030               DestReceiver *dest, char *completionTag);
00031 extern PGDLLIMPORT ProcessUtility_hook_type ProcessUtility_hook;
00032 
00033 extern void ProcessUtility(Node *parsetree, const char *queryString,
00034                ProcessUtilityContext context, ParamListInfo params,
00035                DestReceiver *dest, char *completionTag);
00036 extern void standard_ProcessUtility(Node *parsetree, const char *queryString,
00037                         ProcessUtilityContext context, ParamListInfo params,
00038                         DestReceiver *dest, char *completionTag);
00039 
00040 extern bool UtilityReturnsTuples(Node *parsetree);
00041 
00042 extern TupleDesc UtilityTupleDescriptor(Node *parsetree);
00043 
00044 extern Query *UtilityContainsQuery(Node *parsetree);
00045 
00046 extern const char *CreateCommandTag(Node *parsetree);
00047 
00048 extern LogStmtLevel GetCommandLogLevel(Node *parsetree);
00049 
00050 extern bool CommandIsReadOnly(Node *parsetree);
00051 
00052 extern void CheckRelationOwnership(RangeVar *rel, bool noCatalogs);
00053 
00054 #endif   /* UTILITY_H */