diff options
Diffstat (limited to 'src/include/utils/guc.h')
-rw-r--r-- | src/include/utils/guc.h | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index bf0dfcbe4dc..c4ff10a1401 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -4,7 +4,7 @@ * External declarations pertaining to backend/utils/misc/guc.c and * backend/utils/misc/guc-file.l * - * $Header: /cvsroot/pgsql/src/include/utils/guc.h,v 1.1 2000/05/31 00:28:40 petere Exp $ + * $Header: /cvsroot/pgsql/src/include/utils/guc.h,v 1.2 2000/06/22 22:31:24 petere Exp $ */ #ifndef GUC_H #define GUC_H @@ -12,20 +12,43 @@ #include "postgres.h" /* - * This is sort of a permission list. Those contexts with a higher - * number can also be set via the lower numbered ways. + * Certain options can only be set at certain times. The rules are + * like this: + * + * POSTMASTER options can only be set when the postmaster starts, + * either from the configuration file or the command line. + * + * SIGHUP options can only be set at postmaster startup or by changing + * the configuration file and sending the HUP signal to the postmaster + * or a backend process. (Notice that the signal receipt will not be + * evaluated immediately. The postmaster and the backend block at a + * certain point in their main loop. It's safer to wait than to read a + * file asynchronously.) + * + * BACKEND options can only be set at postmaster startup or with the + * PGOPTIONS variable from the client when the connection is + * initiated. Note that you cannot change this kind of option using + * the SIGHUP mechanism, that would defeat the purpose of this being + * fixed for a given backend once started. + * + * SUSET options can be set at postmaster startup, with the SIGHUP + * mechanism, or from SQL if you're a superuser. These options cannot + * be set using the PGOPTIONS mechanism, because there is not check as + * to who does this. + * + * USERSET options can be set by anyone any time. */ typedef enum { - PGC_POSTMASTER = 1, /* static postmaster option */ - PGC_BACKEND = 2, /* per backend startup option */ - PGC_SIGHUP = 4, /* can change this option via SIGHUP */ - PGC_SUSET = 8, /* can change this option via SET if superuser */ - PGC_USERSET = 16, /* everyone can change this option via SET */ + PGC_POSTMASTER, + PGC_SIGHUP, + PGC_BACKEND, + PGC_SUSET, + PGC_USERSET, } GucContext; void SetConfigOption(const char * name, const char * value, GucContext context); -const char * GetConfigOption(const char * name, bool issuper); +const char * GetConfigOption(const char * name); void ProcessConfigFile(GucContext context); void ResetAllOptions(void); @@ -44,4 +67,6 @@ extern bool Show_executor_stats; extern bool Show_query_stats; extern bool Show_btree_build_stats; +extern bool SQL_inheritance; + #endif /*GUC_H*/ |