Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TCOPPROT_H
00020 #define TCOPPROT_H
00021
00022 #include "nodes/params.h"
00023 #include "nodes/parsenodes.h"
00024 #include "nodes/plannodes.h"
00025 #include "storage/procsignal.h"
00026 #include "utils/guc.h"
00027
00028
00029
00030 #define STACK_DEPTH_SLOP (512 * 1024L)
00031
00032 extern CommandDest whereToSendOutput;
00033 extern PGDLLIMPORT const char *debug_query_string;
00034 extern int max_stack_depth;
00035 extern int PostAuthDelay;
00036
00037
00038
00039 typedef enum
00040 {
00041 LOGSTMT_NONE,
00042 LOGSTMT_DDL,
00043 LOGSTMT_MOD,
00044 LOGSTMT_ALL
00045 } LogStmtLevel;
00046
00047 extern int log_statement;
00048
00049 extern List *pg_parse_query(const char *query_string);
00050 extern List *pg_analyze_and_rewrite(Node *parsetree, const char *query_string,
00051 Oid *paramTypes, int numParams);
00052 extern List *pg_analyze_and_rewrite_params(Node *parsetree,
00053 const char *query_string,
00054 ParserSetupHook parserSetup,
00055 void *parserSetupArg);
00056 extern PlannedStmt *pg_plan_query(Query *querytree, int cursorOptions,
00057 ParamListInfo boundParams);
00058 extern List *pg_plan_queries(List *querytrees, int cursorOptions,
00059 ParamListInfo boundParams);
00060
00061 extern bool check_max_stack_depth(int *newval, void **extra, GucSource source);
00062 extern void assign_max_stack_depth(int newval, void *extra);
00063
00064 extern void die(SIGNAL_ARGS);
00065 extern void quickdie(SIGNAL_ARGS) __attribute__((noreturn));
00066 extern void StatementCancelHandler(SIGNAL_ARGS);
00067 extern void FloatExceptionHandler(SIGNAL_ARGS) __attribute__((noreturn));
00068 extern void RecoveryConflictInterrupt(ProcSignalReason reason);
00069
00070 extern void prepare_for_client_read(void);
00071 extern void client_read_ended(void);
00072 extern void process_postgres_switches(int argc, char *argv[],
00073 GucContext ctx, const char **dbname);
00074 extern void PostgresMain(int argc, char *argv[],
00075 const char *dbname,
00076 const char *username) __attribute__((noreturn));
00077 extern long get_stack_depth_rlimit(void);
00078 extern void ResetUsage(void);
00079 extern void ShowUsage(const char *title);
00080 extern int check_log_duration(char *msec_str, bool was_logged);
00081 extern void set_debug_options(int debug_flag,
00082 GucContext context, GucSource source);
00083 extern bool set_plan_disabling_options(const char *arg,
00084 GucContext context, GucSource source);
00085 extern const char *get_stats_option_name(const char *arg);
00086
00087 #endif