aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/guc.h
blob: 0d8661442f17cfd400f5d031153da9a719381557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * guc.h
 *
 * 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.4 2000/07/27 19:49:24 momjian Exp $
 */
#ifndef GUC_H
#define GUC_H

#include "postgres.h"

/*
 * 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,
	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);
void         ProcessConfigFile(GucContext context);
void         ResetAllOptions(void);
void         ParseLongOption(const char * string, char ** name, char ** value);
bool         set_config_option(const char * name, const char * value, GucContext context, bool DoIt);


extern bool Debug_print_query;
extern bool Debug_print_plan;
extern bool Debug_print_parse;
extern bool Debug_print_rewritten;
extern bool Debug_pretty_print;

extern bool Show_parser_stats;
extern bool Show_planner_stats;
extern bool Show_executor_stats;
extern bool Show_query_stats;
extern bool Show_btree_build_stats;

extern bool SQL_inheritance;

#endif /*GUC_H*/