aboutsummaryrefslogtreecommitdiff
path: root/src/include/tcop
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/tcop')
-rw-r--r--src/include/tcop/dest.h88
-rw-r--r--src/include/tcop/fastpath.h22
-rw-r--r--src/include/tcop/pquery.h22
-rw-r--r--src/include/tcop/tcopdebug.h22
-rw-r--r--src/include/tcop/tcopprot.h35
-rw-r--r--src/include/tcop/utility.h8
-rw-r--r--src/include/tcop/variable.h25
7 files changed, 117 insertions, 105 deletions
diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h
index 7878ed9d41e..aa74fafbfe7 100644
--- a/src/include/tcop/dest.h
+++ b/src/include/tcop/dest.h
@@ -1,32 +1,32 @@
/*-------------------------------------------------------------------------
*
* dest.h--
- * Whenever the backend is submitted a query, the results
- * have to go someplace - either to the standard output,
- * to a local portal buffer or to a remote portal buffer.
+ * Whenever the backend is submitted a query, the results
+ * have to go someplace - either to the standard output,
+ * to a local portal buffer or to a remote portal buffer.
*
- * - stdout is the destination only when we are running a
- * backend without a postmaster and are returning results
- * back to the user.
+ * - stdout is the destination only when we are running a
+ * backend without a postmaster and are returning results
+ * back to the user.
*
- * - a local portal buffer is the destination when a backend
- * executes a user-defined function which calls PQexec() or
- * PQfn(). In this case, the results are collected into a
- * PortalBuffer which the user's function may diddle with.
+ * - a local portal buffer is the destination when a backend
+ * executes a user-defined function which calls PQexec() or
+ * PQfn(). In this case, the results are collected into a
+ * PortalBuffer which the user's function may diddle with.
*
- * - a remote portal buffer is the destination when we are
- * running a backend with a frontend and the frontend executes
- * PQexec() or PQfn(). In this case, the results are sent
- * to the frontend via the pq_ functions.
+ * - a remote portal buffer is the destination when we are
+ * running a backend with a frontend and the frontend executes
+ * PQexec() or PQfn(). In this case, the results are sent
+ * to the frontend via the pq_ functions.
+ *
+ * - None is the destination when the system executes
+ * a query internally. This is not used now but it may be
+ * useful for the parallel optimiser/executor.
*
- * - None is the destination when the system executes
- * a query internally. This is not used now but it may be
- * useful for the parallel optimiser/executor.
- *
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dest.h,v 1.8 1997/08/29 09:06:27 vadim Exp $
+ * $Id: dest.h,v 1.9 1997/09/07 05:01:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,40 +36,44 @@
#include <access/tupdesc.h>
/* ----------------
- * CommandDest is used to allow the results of calling
- * pg_eval() to go to the right place.
+ * CommandDest is used to allow the results of calling
+ * pg_eval() to go to the right place.
* ----------------
*/
-typedef enum {
- None, /* results are discarded */
- Debug, /* results go to debugging output */
- Local, /* results go in local portal buffer */
- Remote, /* results sent to frontend process */
- CopyBegin, /* results sent to frontend process but are strings */
- CopyEnd, /* results sent to frontend process but are strings */
- RemoteInternal, /* results sent to frontend process in internal
- (binary) form */
- SPI /* results sent to SPI manager */
-} CommandDest;
+typedef enum
+{
+ None, /* results are discarded */
+ Debug, /* results go to debugging output */
+ Local, /* results go in local portal buffer */
+ Remote, /* results sent to frontend process */
+ CopyBegin, /* results sent to frontend process but
+ * are strings */
+ CopyEnd, /* results sent to frontend process but
+ * are strings */
+ RemoteInternal, /* results sent to frontend process in
+ * internal (binary) form */
+ SPI /* results sent to SPI manager */
+} CommandDest;
/* AttrInfo* replaced with TupleDesc, now that TupleDesc also has within it
the number of attributes
typedef struct AttrInfo {
- int numAttr;
- AttributeTupleForm *attrs;
+ int numAttr;
+ AttributeTupleForm *attrs;
} AttrInfo;
*/
-extern void (*DestToFunction(CommandDest dest))();
-extern void EndCommand(char *commandTag, CommandDest dest);
-extern void SendCopyBegin(void);
-extern void ReceiveCopyBegin(void);
-extern void NullCommand(CommandDest dest);
-extern void BeginCommand(char *pname, int operation, TupleDesc attinfo,
+extern void (*DestToFunction(CommandDest dest)) ();
+extern void EndCommand(char *commandTag, CommandDest dest);
+extern void SendCopyBegin(void);
+extern void ReceiveCopyBegin(void);
+extern void NullCommand(CommandDest dest);
+extern void
+BeginCommand(char *pname, int operation, TupleDesc attinfo,
bool isIntoRel, bool isIntoPortal, char *tag,
CommandDest dest);
-extern void UpdateCommandInfo (int operation, Oid lastoid, uint32 tuples);
+extern void UpdateCommandInfo(int operation, Oid lastoid, uint32 tuples);
-#endif /* DEST_H */
+#endif /* DEST_H */
diff --git a/src/include/tcop/fastpath.h b/src/include/tcop/fastpath.h
index a46d6f2d6f1..96b5f598eac 100644
--- a/src/include/tcop/fastpath.h
+++ b/src/include/tcop/fastpath.h
@@ -1,17 +1,17 @@
/*-------------------------------------------------------------------------
*
* fastpath.h--
- *
+ *
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fastpath.h,v 1.1 1996/08/28 07:27:50 scrappy Exp $
+ * $Id: fastpath.h,v 1.2 1997/09/07 05:01:46 momjian Exp $
*
* NOTES
- * This information pulled out of tcop/fastpath.c and put
- * here so that the PQfn() in be-pqexec.c could access it.
- * -cim 2/26/91
+ * This information pulled out of tcop/fastpath.c and put
+ * here so that the PQfn() in be-pqexec.c could access it.
+ * -cim 2/26/91
*
*-------------------------------------------------------------------------
*/
@@ -19,13 +19,13 @@
#define FASTPATH_H
/* ----------------
- * fastpath #defines
+ * fastpath #defines
* ----------------
*/
-#define VAR_LENGTH_RESULT (-1)
-#define VAR_LENGTH_ARG (-5)
-#define MAX_STRING_LENGTH 256
+#define VAR_LENGTH_RESULT (-1)
+#define VAR_LENGTH_ARG (-5)
+#define MAX_STRING_LENGTH 256
-extern int HandleFunctionRequest(void);
+extern int HandleFunctionRequest(void);
-#endif /* FASTPATH_H */
+#endif /* FASTPATH_H */
diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h
index 9f45684c5b5..9d9117315b8 100644
--- a/src/include/tcop/pquery.h
+++ b/src/include/tcop/pquery.h
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* pquery.h--
- * prototypes for pquery.c.
+ * prototypes for pquery.c.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pquery.h,v 1.4 1997/08/19 21:40:09 momjian Exp $
+ * $Id: pquery.h,v 1.5 1997/09/07 05:01:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,19 +15,21 @@
#include <executor/execdesc.h>
-/* moved to execdesc.h
+/* moved to execdesc.h
extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
- CommandDest dest);
+ CommandDest dest);
*/
-extern EState *CreateExecutorState(void);
+extern EState *CreateExecutorState(void);
-extern void ProcessPortal(char *portalName, Query *parseTree,
- Plan *plan, EState *state, TupleDesc attinfo,
+extern void
+ProcessPortal(char *portalName, Query * parseTree,
+ Plan * plan, EState * state, TupleDesc attinfo,
CommandDest dest);
-extern void ProcessQuery(Query *parsetree, Plan *plan, char *argv[],
- Oid *typev, int nargs, CommandDest dest);
+extern void
+ProcessQuery(Query * parsetree, Plan * plan, char *argv[],
+ Oid * typev, int nargs, CommandDest dest);
-#endif /* pqueryIncluded */
+#endif /* pqueryIncluded */
diff --git a/src/include/tcop/tcopdebug.h b/src/include/tcop/tcopdebug.h
index ecec82c652f..a4512f6686c 100644
--- a/src/include/tcop/tcopdebug.h
+++ b/src/include/tcop/tcopdebug.h
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* tcopdebug.h--
- * #defines governing debugging behaviour in the traffic cop
+ * #defines governing debugging behaviour in the traffic cop
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tcopdebug.h,v 1.1 1996/08/28 07:27:52 scrappy Exp $
+ * $Id: tcopdebug.h,v 1.2 1997/09/07 05:01:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,30 +14,30 @@
#define TCOPDEBUG_H
/* ----------------------------------------------------------------
- * debugging defines.
+ * debugging defines.
*
- * If you want certain debugging behaviour, then #define
- * the variable to 1, else #undef it. -cim 10/26/89
+ * If you want certain debugging behaviour, then #define
+ * the variable to 1, else #undef it. -cim 10/26/89
* ----------------------------------------------------------------
*/
/* ----------------
- * TCOP_SHOWSTATS controls whether or not buffer and
- * access method statistics are shown for each query. -cim 2/9/89
+ * TCOP_SHOWSTATS controls whether or not buffer and
+ * access method statistics are shown for each query. -cim 2/9/89
* ----------------
*/
#undef TCOP_SHOWSTATS
/* ----------------
- * TCOP_DONTUSENEWLINE controls the default setting of
- * the UseNewLine variable in postgres.c
+ * TCOP_DONTUSENEWLINE controls the default setting of
+ * the UseNewLine variable in postgres.c
* ----------------
*/
#undef TCOP_DONTUSENEWLINE
/* ----------------------------------------------------------------
- * #defines controlled by above definitions
+ * #defines controlled by above definitions
* ----------------------------------------------------------------
*/
-#endif /* TCOPDEBUG_H */
+#endif /* TCOPDEBUG_H */
diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h
index 15af78b84fd..07a3cff98d0 100644
--- a/src/include/tcop/tcopprot.h
+++ b/src/include/tcop/tcopprot.h
@@ -1,17 +1,17 @@
/*-------------------------------------------------------------------------
*
* tcopprot.h--
- * prototypes for postgres.c.
+ * prototypes for postgres.c.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tcopprot.h,v 1.4 1997/08/19 21:40:10 momjian Exp $
+ * $Id: tcopprot.h,v 1.5 1997/09/07 05:01:56 momjian Exp $
*
* OLD COMMENTS
- * This file was created so that other c files could get the two
- * function prototypes without having to include tcop.h which single
- * handedly includes the whole f*cking tree -- mer 5 Nov. 1991
+ * This file was created so that other c files could get the two
+ * function prototypes without having to include tcop.h which single
+ * handedly includes the whole f*cking tree -- mer 5 Nov. 1991
*
*-------------------------------------------------------------------------
*/
@@ -22,17 +22,20 @@
#include <parser/parse_query.h>
#ifndef BOOTSTRAP_INCLUDE
-extern List *pg_plan(char *query_string, Oid *typev, int nargs,
- QueryTreeList **queryListP, CommandDest dest);
-extern void pg_eval(char *query_string, char **argv, Oid *typev, int nargs);
-extern void pg_eval_dest(char *query_string, char **argv, Oid *typev,
+extern List *
+pg_plan(char *query_string, Oid * typev, int nargs,
+ QueryTreeList ** queryListP, CommandDest dest);
+extern void pg_eval(char *query_string, char **argv, Oid * typev, int nargs);
+extern void
+pg_eval_dest(char *query_string, char **argv, Oid * typev,
int nargs, CommandDest dest);
-#endif /* BOOTSTRAP_HEADER */
-extern void handle_warn(SIGNAL_ARGS);
-extern void die(SIGNAL_ARGS);
-extern int PostgresMain(int argc, char *argv[]);
-extern void ResetUsage(void);
-extern void ShowUsage(void);
+#endif /* BOOTSTRAP_HEADER */
-#endif /* tcopprotIncluded */
+extern void handle_warn(SIGNAL_ARGS);
+extern void die(SIGNAL_ARGS);
+extern int PostgresMain(int argc, char *argv[]);
+extern void ResetUsage(void);
+extern void ShowUsage(void);
+
+#endif /* tcopprotIncluded */
diff --git a/src/include/tcop/utility.h b/src/include/tcop/utility.h
index ec0842dd3a3..f5242ff4738 100644
--- a/src/include/tcop/utility.h
+++ b/src/include/tcop/utility.h
@@ -1,12 +1,12 @@
/*-------------------------------------------------------------------------
*
* utility.h--
- * prototypes for utility.c.
+ * prototypes for utility.c.
*
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: utility.h,v 1.2 1996/11/04 12:07:05 scrappy Exp $
+ * $Id: utility.h,v 1.3 1997/09/07 05:01:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,6 +15,6 @@
#include <executor/execdesc.h>
-extern void ProcessUtility(Node *parsetree, CommandDest dest);
+extern void ProcessUtility(Node * parsetree, CommandDest dest);
-#endif /* UTILITY_H */
+#endif /* UTILITY_H */
diff --git a/src/include/tcop/variable.h b/src/include/tcop/variable.h
index a0f10801eac..a687d8fed6f 100644
--- a/src/include/tcop/variable.h
+++ b/src/include/tcop/variable.h
@@ -1,26 +1,29 @@
/*
- * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var'
+ * Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements
*
- * $Id: variable.h,v 1.4 1997/04/23 05:52:32 vadim Exp $
+ * $Id: variable.h,v 1.5 1997/09/07 05:02:01 momjian Exp $
*
*/
-enum DateFormat { Date_Postgres, Date_SQL, Date_ISO };
+enum DateFormat
+{
+ Date_Postgres, Date_SQL, Date_ISO
+};
/*-----------------------------------------------------------------------*/
struct PGVariables
- {
+{
struct
- {
- bool euro;
+ {
+ bool euro;
enum DateFormat format;
- } date;
- };
+ } date;
+};
extern struct PGVariables PGVariables;
/*-----------------------------------------------------------------------*/
-bool SetPGVariable(const char *, const char *);
-bool GetPGVariable(const char *);
-bool ResetPGVariable(const char *);
+bool SetPGVariable(const char *, const char *);
+bool GetPGVariable(const char *);
+bool ResetPGVariable(const char *);