]> granicus.if.org Git - postgresql/blob - src/include/tcop/tcopprot.h
Integrate autovacuum functionality into the backend. There's still a
[postgresql] / src / include / tcop / tcopprot.h
1 /*-------------------------------------------------------------------------
2  *
3  * tcopprot.h
4  *        prototypes for postgres.c.
5  *
6  *
7  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/tcop/tcopprot.h,v 1.76 2005/07/14 05:13:44 tgl Exp $
11  *
12  * OLD COMMENTS
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
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef TCOPPROT_H
20 #define TCOPPROT_H
21
22 #include "executor/execdesc.h"
23 #include "nodes/params.h"
24 #include "tcop/dest.h"
25 #include "utils/guc.h"
26
27
28 extern CommandDest whereToSendOutput;
29 extern DLLIMPORT const char *debug_query_string;
30 extern int      max_stack_depth;
31
32 /* GUC-configurable parameters */
33
34 typedef enum
35 {
36         LOGSTMT_NONE,                           /* log no statements */
37         LOGSTMT_DDL,                            /* log data definition statements */
38         LOGSTMT_MOD,                            /* log modification statements, plus DDL */
39         LOGSTMT_ALL                                     /* log all statements */
40 } LogStmtLevel;
41
42 extern LogStmtLevel log_statement;
43
44 #ifndef BOOTSTRAP_INCLUDE
45
46 extern List *pg_parse_and_rewrite(const char *query_string,
47                                          Oid *paramTypes, int numParams);
48 extern List *pg_parse_query(const char *query_string);
49 extern List *pg_analyze_and_rewrite(Node *parsetree,
50                                            Oid *paramTypes, int numParams);
51 extern Plan *pg_plan_query(Query *querytree, ParamListInfo boundParams);
52 extern List *pg_plan_queries(List *querytrees, ParamListInfo boundParams,
53                                 bool needSnapshot);
54
55 extern bool assign_max_stack_depth(int newval, bool doit, GucSource source);
56 #endif   /* BOOTSTRAP_INCLUDE */
57
58 extern void die(SIGNAL_ARGS);
59 extern void quickdie(SIGNAL_ARGS);
60 extern void authdie(SIGNAL_ARGS);
61 extern void StatementCancelHandler(SIGNAL_ARGS);
62 extern void prepare_for_client_read(void);
63 extern void client_read_ended(void);
64 extern int      PostgresMain(int argc, char *argv[], const char *username);
65 extern void ResetUsage(void);
66 extern void ShowUsage(const char *title);
67 extern void set_debug_options(int debug_flag,
68                                                           GucContext context, GucSource source);
69
70 #endif   /* TCOPPROT_H */