]> granicus.if.org Git - postgresql/blob - src/include/utils/guc.h
08774128c140fef2e7c4c29a36c085376891c652
[postgresql] / src / include / utils / guc.h
1 /*
2  * guc.h
3  *
4  * External declarations pertaining to backend/utils/misc/guc.c and
5  * backend/utils/misc/guc-file.l
6  *
7  * $Id: guc.h,v 1.8 2001/06/12 22:54:06 tgl Exp $
8  */
9 #ifndef GUC_H
10 #define GUC_H
11
12 /*
13  * Certain options can only be set at certain times. The rules are
14  * like this:
15  *
16  * POSTMASTER options can only be set when the postmaster starts,
17  * either from the configuration file or the command line.
18  *
19  * SIGHUP options can only be set at postmaster startup or by changing
20  * the configuration file and sending the HUP signal to the postmaster
21  * or a backend process. (Notice that the signal receipt will not be
22  * evaluated immediately. The postmaster and the backend block at a
23  * certain point in their main loop. It's safer to wait than to read a
24  * file asynchronously.)
25  *
26  * BACKEND options can only be set at postmaster startup or with the
27  * PGOPTIONS variable from the client when the connection is
28  * initiated. Note that you cannot change this kind of option using
29  * the SIGHUP mechanism, that would defeat the purpose of this being
30  * fixed for a given backend once started.
31  *
32  * SUSET options can be set at postmaster startup, with the SIGHUP
33  * mechanism, or from SQL if you're a superuser. These options cannot
34  * be set using the PGOPTIONS mechanism, because there is not check as
35  * to who does this.
36  *
37  * USERSET options can be set by anyone any time.
38  */
39 typedef enum
40 {
41         PGC_POSTMASTER,
42         PGC_SIGHUP,
43         PGC_BACKEND,
44         PGC_SUSET,
45         PGC_USERSET
46 } GucContext;
47
48
49 extern void SetConfigOption(const char *name, const char *value,
50                                                         GucContext context, bool makeDefault);
51 extern const char *GetConfigOption(const char *name);
52 extern void ProcessConfigFile(GucContext context);
53 extern void ResetAllOptions(bool isStartup);
54 extern void ParseLongOption(const char *string, char **name, char **value);
55 extern bool set_config_option(const char *name, const char *value,
56                                                           GucContext context, bool DoIt, bool makeDefault);
57 extern void ShowAllGUCConfig(void);
58
59
60 extern bool Debug_print_query;
61 extern bool Debug_print_plan;
62 extern bool Debug_print_parse;
63 extern bool Debug_print_rewritten;
64 extern bool Debug_pretty_print;
65
66 extern bool Show_parser_stats;
67 extern bool Show_planner_stats;
68 extern bool Show_executor_stats;
69 extern bool Show_query_stats;
70 extern bool Show_btree_build_stats;
71
72 extern bool SQL_inheritance;
73
74 #endif   /* GUC_H */