Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / tcop / tcopprot.h
blob968345404e54d7f559c7cfe086d4b1f036986342
1 /*-------------------------------------------------------------------------
3 * tcopprot.h
4 * prototypes for postgres.c.
7 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/tcop/tcopprot.h
12 *-------------------------------------------------------------------------
14 #ifndef TCOPPROT_H
15 #define TCOPPROT_H
17 #include "nodes/params.h"
18 #include "nodes/parsenodes.h"
19 #include "nodes/plannodes.h"
20 #include "storage/procsignal.h"
21 #include "utils/guc.h"
22 #include "utils/queryenvironment.h"
25 /* Required daylight between max_stack_depth and the kernel limit, in bytes */
26 #define STACK_DEPTH_SLOP (512 * 1024L)
28 extern CommandDest whereToSendOutput;
29 extern PGDLLIMPORT const char *debug_query_string;
30 extern int max_stack_depth;
31 extern int PostAuthDelay;
32 extern int client_connection_check_interval;
34 /* GUC-configurable parameters */
36 typedef enum
38 LOGSTMT_NONE, /* log no statements */
39 LOGSTMT_DDL, /* log data definition statements */
40 LOGSTMT_MOD, /* log modification statements, plus DDL */
41 LOGSTMT_ALL /* log all statements */
42 } LogStmtLevel;
44 extern PGDLLIMPORT int log_statement;
46 extern List *pg_parse_query(const char *query_string);
47 extern List *pg_rewrite_query(Query *query);
48 extern List *pg_analyze_and_rewrite(RawStmt *parsetree,
49 const char *query_string,
50 Oid *paramTypes, int numParams,
51 QueryEnvironment *queryEnv);
52 extern List *pg_analyze_and_rewrite_params(RawStmt *parsetree,
53 const char *query_string,
54 ParserSetupHook parserSetup,
55 void *parserSetupArg,
56 QueryEnvironment *queryEnv);
57 extern PlannedStmt *pg_plan_query(Query *querytree, const char *query_string,
58 int cursorOptions,
59 ParamListInfo boundParams);
60 extern List *pg_plan_queries(List *querytrees, const char *query_string,
61 int cursorOptions,
62 ParamListInfo boundParams);
64 extern bool check_max_stack_depth(int *newval, void **extra, GucSource source);
65 extern void assign_max_stack_depth(int newval, void *extra);
67 extern void die(SIGNAL_ARGS);
68 extern void quickdie(SIGNAL_ARGS) pg_attribute_noreturn();
69 extern void StatementCancelHandler(SIGNAL_ARGS);
70 extern void FloatExceptionHandler(SIGNAL_ARGS) pg_attribute_noreturn();
71 extern void RecoveryConflictInterrupt(ProcSignalReason reason); /* called from SIGUSR1
72 * handler */
73 extern void ProcessClientReadInterrupt(bool blocked);
74 extern void ProcessClientWriteInterrupt(bool blocked);
76 extern void process_postgres_switches(int argc, char *argv[],
77 GucContext ctx, const char **dbname);
78 extern void PostgresMain(int argc, char *argv[],
79 const char *dbname,
80 const char *username) pg_attribute_noreturn();
81 extern long get_stack_depth_rlimit(void);
82 extern void ResetUsage(void);
83 extern void ShowUsage(const char *title);
84 extern int check_log_duration(char *msec_str, bool was_logged);
85 extern void set_debug_options(int debug_flag,
86 GucContext context, GucSource source);
87 extern bool set_plan_disabling_options(const char *arg,
88 GucContext context, GucSource source);
89 extern const char *get_stats_option_name(const char *arg);
91 #endif /* TCOPPROT_H */