1 /*-------------------------------------------------------------------------
4 * prototypes for postgres.c.
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
13 * This file was created so that other c files could get the two
14 * function prototypes without having to include tcop.h which single
15 * handedly includes the whole f*cking tree -- mer 5 Nov. 1991
17 *-------------------------------------------------------------------------
22 #include "executor/execdesc.h"
23 #include "nodes/parsenodes.h"
24 #include "utils/guc.h"
27 /* Required daylight between max_stack_depth and the kernel limit, in bytes */
28 #define STACK_DEPTH_SLOP (512 * 1024L)
30 extern CommandDest whereToSendOutput
;
31 extern PGDLLIMPORT
const char *debug_query_string
;
32 extern int max_stack_depth
;
33 extern int PostAuthDelay
;
35 /* GUC-configurable parameters */
39 LOGSTMT_NONE
, /* log no statements */
40 LOGSTMT_DDL
, /* log data definition statements */
41 LOGSTMT_MOD
, /* log modification statements, plus DDL */
42 LOGSTMT_ALL
/* log all statements */
45 extern int log_statement
;
47 extern List
*pg_parse_and_rewrite(const char *query_string
,
48 Oid
*paramTypes
, int numParams
);
49 extern List
*pg_parse_query(const char *query_string
);
50 extern List
*pg_analyze_and_rewrite(Node
*parsetree
, const char *query_string
,
51 Oid
*paramTypes
, int numParams
);
52 extern PlannedStmt
*pg_plan_query(Query
*querytree
, int cursorOptions
,
53 ParamListInfo boundParams
);
54 extern List
*pg_plan_queries(List
*querytrees
, int cursorOptions
,
55 ParamListInfo boundParams
, bool needSnapshot
);
57 extern bool assign_max_stack_depth(int newval
, bool doit
, GucSource source
);
59 extern void die(SIGNAL_ARGS
);
60 extern void quickdie(SIGNAL_ARGS
);
61 extern void authdie(SIGNAL_ARGS
);
62 extern void StatementCancelHandler(SIGNAL_ARGS
);
63 extern void FloatExceptionHandler(SIGNAL_ARGS
);
64 extern void prepare_for_client_read(void);
65 extern void client_read_ended(void);
66 extern int PostgresMain(int argc
, char *argv
[], const char *username
);
67 extern long get_stack_depth_rlimit(void);
68 extern void ResetUsage(void);
69 extern void ShowUsage(const char *title
);
70 extern int check_log_duration(char *msec_str
, bool was_logged
);
71 extern void set_debug_options(int debug_flag
,
72 GucContext context
, GucSource source
);
73 extern bool set_plan_disabling_options(const char *arg
,
74 GucContext context
, GucSource source
);
75 extern const char *get_stats_option_name(const char *arg
);
77 #endif /* TCOPPROT_H */