]> granicus.if.org Git - postgresql/commitdiff
Reduce the need for frontend programs to include "postgres.h" by refactoring
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 27 Mar 2008 03:57:34 +0000 (03:57 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 27 Mar 2008 03:57:34 +0000 (03:57 +0000)
inclusions in src/include/catalog/*.h files.  The main idea here is to push
function declarations for src/backend/catalog/*.c files into separate headers,
rather than sticking them into the corresponding catalog definition file as
has been done in the past.  This commit only carries out that idea fully for
pg_proc, pg_type and pg_conversion, but that's enough for the moment ---
if pg_list.h ever becomes unsafe for frontend code to include, we'll need
to work a bit more.

Zdenek Kotala

67 files changed:
src/backend/catalog/dependency.c
src/backend/catalog/heap.c
src/backend/catalog/namespace.c
src/backend/catalog/pg_aggregate.c
src/backend/catalog/pg_conversion.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_type.c
src/backend/commands/conversioncmds.c
src/backend/commands/functioncmds.c
src/backend/commands/proclang.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/parser/keywords.c
src/backend/utils/hash/pg_crc.c
src/bin/pg_config/pg_config.c
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_dump/common.c
src/bin/pg_dump/pg_dump.c
src/bin/psql/print.c
src/include/catalog/genbki.h [new file with mode: 0644]
src/include/catalog/pg_aggregate.h
src/include/catalog/pg_am.h
src/include/catalog/pg_amop.h
src/include/catalog/pg_amproc.h
src/include/catalog/pg_attrdef.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_auth_members.h
src/include/catalog/pg_authid.h
src/include/catalog/pg_autovacuum.h
src/include/catalog/pg_cast.h
src/include/catalog/pg_class.h
src/include/catalog/pg_constraint.h
src/include/catalog/pg_conversion.h
src/include/catalog/pg_conversion_fn.h [new file with mode: 0644]
src/include/catalog/pg_database.h
src/include/catalog/pg_depend.h
src/include/catalog/pg_description.h
src/include/catalog/pg_enum.h
src/include/catalog/pg_index.h
src/include/catalog/pg_inherits.h
src/include/catalog/pg_language.h
src/include/catalog/pg_largeobject.h
src/include/catalog/pg_listener.h
src/include/catalog/pg_namespace.h
src/include/catalog/pg_opclass.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_opfamily.h
src/include/catalog/pg_pltemplate.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc_fn.h [new file with mode: 0644]
src/include/catalog/pg_rewrite.h
src/include/catalog/pg_shdepend.h
src/include/catalog/pg_shdescription.h
src/include/catalog/pg_statistic.h
src/include/catalog/pg_tablespace.h
src/include/catalog/pg_trigger.h
src/include/catalog/pg_ts_config.h
src/include/catalog/pg_ts_config_map.h
src/include/catalog/pg_ts_dict.h
src/include/catalog/pg_ts_parser.h
src/include/catalog/pg_ts_template.h
src/include/catalog/pg_type.h
src/include/catalog/pg_type_fn.h [new file with mode: 0644]
src/include/commands/sequence.h
src/include/pg_config_manual.h
src/include/postgres.h
src/pl/plpgsql/src/pl_comp.c

index 44b674b00221b2648f21361e85a13b7897404d66..54af43135e182881fb0d0214d18e55dbce2da3b2 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.70 2008/03/26 21:10:37 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/dependency.c,v 1.71 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -29,6 +29,7 @@
 #include "catalog/pg_cast.h"
 #include "catalog/pg_constraint.h"
 #include "catalog/pg_conversion.h"
+#include "catalog/pg_conversion_fn.h"
 #include "catalog/pg_database.h"
 #include "catalog/pg_depend.h"
 #include "catalog/pg_language.h"
index 2ee79aef9f0c40a21df9ff2aa97b309fdcde3e30..567280e152914d9bbcaeddead90281928b6756d0 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.331 2008/03/26 21:10:37 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.332 2008/03/27 03:57:33 tgl Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -45,6 +45,7 @@
 #include "catalog/pg_statistic.h"
 #include "catalog/pg_tablespace.h"
 #include "catalog/pg_type.h"
+#include "catalog/pg_type_fn.h"
 #include "commands/tablecmds.h"
 #include "commands/typecmds.h"
 #include "miscadmin.h"
index 1383d1e2afdd9d7cb467def2fbaa0c95e829a788..0cb7cf95f7ff8aaf8c8ca1ff3cebedfa28dc2d02 100644 (file)
@@ -13,7 +13,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.104 2008/01/01 19:45:48 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/namespace.c,v 1.105 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -24,6 +24,7 @@
 #include "catalog/namespace.h"
 #include "catalog/pg_authid.h"
 #include "catalog/pg_conversion.h"
+#include "catalog/pg_conversion_fn.h"
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_opclass.h"
 #include "catalog/pg_operator.h"
index c88f9973b975ea54c3b48eb93a90b62a5d591427..69b01b17e1b229e03ca7038107ea5c7079e95434 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/pg_aggregate.c,v 1.91 2008/03/25 22:42:42 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/pg_aggregate.c,v 1.92 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -21,6 +21,7 @@
 #include "catalog/pg_language.h"
 #include "catalog/pg_operator.h"
 #include "catalog/pg_proc.h"
+#include "catalog/pg_proc_fn.h"
 #include "catalog/pg_type.h"
 #include "miscadmin.h"
 #include "parser/parse_coerce.h"
index 68b9f2e293429b7eb49407de78447961ecbdfd66..a456ca4b49a03c38c5a34c5b30b58e430ae72f91 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.41 2008/03/26 21:10:37 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.42 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -19,6 +19,7 @@
 #include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_conversion.h"
+#include "catalog/pg_conversion_fn.h"
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_proc.h"
 #include "mb/pg_wchar.h"
index c099d95c0592f64ac7b158361ba221a72f37b381..1f11f82a3049a38cc4c6d1aa7cc15b5324a58206 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.150 2008/03/25 22:42:42 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.151 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -21,6 +21,7 @@
 #include "catalog/pg_language.h"
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_proc.h"
+#include "catalog/pg_proc_fn.h"
 #include "catalog/pg_type.h"
 #include "executor/functions.h"
 #include "funcapi.h"
index cdbd55c5292562880add8cb32e434a1841a39556..525e4472ddaa22cd2cd9e1743e0111938bd8289f 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/catalog/pg_type.c,v 1.117 2008/03/25 22:42:42 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/catalog/pg_type.c,v 1.118 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -21,6 +21,7 @@
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
+#include "catalog/pg_type_fn.h"
 #include "commands/typecmds.h"
 #include "miscadmin.h"
 #include "parser/scansup.h"
index f1f4738084cbf9022349c7fd4e2664afb9786642..43f5329b0367c9edd0fed1ebb98445ec091f3c3d 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/conversioncmds.c,v 1.32 2008/01/01 19:45:48 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/conversioncmds.c,v 1.33 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -18,6 +18,7 @@
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_conversion.h"
+#include "catalog/pg_conversion_fn.h"
 #include "catalog/pg_type.h"
 #include "commands/conversioncmds.h"
 #include "mb/pg_wchar.h"
index 7f382c5eaa340b5fca82c70868542889c0412e3d..8194b780efb3a86d561f398be2944e799536b478 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.90 2008/03/26 21:10:37 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.91 2008/03/27 03:57:33 tgl Exp $
  *
  * DESCRIPTION
  *       These routines take the parse tree and pick out the
@@ -41,7 +41,9 @@
 #include "catalog/pg_language.h"
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_proc.h"
+#include "catalog/pg_proc_fn.h"
 #include "catalog/pg_type.h"
+#include "catalog/pg_type_fn.h"
 #include "commands/defrem.h"
 #include "commands/proclang.h"
 #include "miscadmin.h"
index ffc1e3963081c4573a3ea0bc334a90f27a9b2b78..f695cc7b420115cc2c61b45225d7b6e701e3ff90 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.76 2008/03/26 21:10:37 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.77 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,6 +22,7 @@
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_pltemplate.h"
 #include "catalog/pg_proc.h"
+#include "catalog/pg_proc_fn.h"
 #include "catalog/pg_type.h"
 #include "commands/dbcommands.h"
 #include "commands/defrem.h"
index a03f0079f8eee41cbf017700bf9e50d588c58694..1754484eeeb85a4ca86a39e39938caff7da6f85d 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.247 2008/03/26 21:10:37 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.248 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -32,6 +32,7 @@
 #include "catalog/pg_tablespace.h"
 #include "catalog/pg_trigger.h"
 #include "catalog/pg_type.h"
+#include "catalog/pg_type_fn.h"
 #include "catalog/toasting.h"
 #include "commands/cluster.h"
 #include "commands/defrem.h"
index c9b5b61929c66e84d9b3d544f981706a19792fff..3f557b078b7f688442af8d1aa60fc0e22d469f70 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.116 2008/03/26 21:10:38 alvherre Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.117 2008/03/27 03:57:33 tgl Exp $
  *
  * DESCRIPTION
  *       The "DefineFoo" routines take the parse tree and pick out the
@@ -43,6 +43,7 @@
 #include "catalog/pg_enum.h"
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_type.h"
+#include "catalog/pg_type_fn.h"
 #include "commands/defrem.h"
 #include "commands/tablecmds.h"
 #include "commands/typecmds.h"
index 301be227d9f8a691a707b0c129775a06c8fdcb96..b5312a487fd44faa337451cb520133de0d49da61 100644 (file)
@@ -3,25 +3,34 @@
  * keywords.c
  *       lexical token lookup for key words in PostgreSQL
  *
+ * NB: This file is also used by pg_dump.
+ *
+ *
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.194 2008/01/01 19:45:50 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.195 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
+
+/* Use c.h so that this file can be built in either frontend or backend */
+#include "c.h"
 
 #include <ctype.h>
 
-#include "nodes/parsenodes.h"
-#include "parser/gramparse.h"  /* required before parser/parse.h! */
+/*
+ * This macro definition overrides the YYSTYPE union definition in parse.h.
+ * We don't need that struct in this file, and including the real definition
+ * would require sucking in some backend-only include files.
+ */
+#define YYSTYPE int
+
 #include "parser/keywords.h"
 #include "parser/parse.h"
 
-/* NB: This file is also used by pg_dump. */
 
 /*
  * List of keyword (name, token-value, category) entries.
index dacd3b94a5fd3b62166272ede742da547ee60b28..b5e8abb58e69fca64b8113db7352cf9936dc41b6 100644 (file)
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/utils/hash/pg_crc.c,v 1.18 2008/01/01 19:45:53 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/utils/hash/pg_crc.c,v 1.19 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
 
+/* Use c.h so that this file can be built in either frontend or backend */
+#include "c.h"
 
 
 /*
index 315b62622af0923da0a3ff6a4f44ecb76c1e4981..db3f9f1e086449a861029d35bca526643883254f 100644 (file)
  *
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.27 2008/02/18 14:51:48 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.28 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
 
-#include "postgres.h"
+#include "postgres_fe.h"
 
 #include "port.h"
 
index 4cb6ada31293ec8e02788f18b79e4575f7ef3f94..ea712654d8337161395704f412c49531c94343d7 100644 (file)
@@ -6,9 +6,9 @@
  * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
  * licence: BSD
  *
- * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.37 2008/02/17 02:09:29 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.38 2008/03/27 03:57:33 tgl Exp $
  */
-#include "postgres.h"
+#include "postgres_fe.h"
 
 #include <unistd.h>
 #include <time.h>
index 288b9d68f5b890617fbade57e5196ad3f9a175f2..2d41a52e1916e1a6c3388c35bce0628a8744b7ec 100644 (file)
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.102 2008/01/01 19:45:55 momjian Exp $
+ *       $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.103 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
-
 #include "postgres_fe.h"
-#include "pg_backup_archiver.h"
 
-#include "postgres.h"
+#include <ctype.h>
+
 #include "catalog/pg_class.h"
 
-#include <ctype.h>
+#include "pg_backup_archiver.h"
 
 
 /*
index ce292e9008378572aca9739ef9f558fa0e317ad6..25e784cb5e92c101225be74ff99d9801506e7e24 100644 (file)
  *     by PostgreSQL
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.484 2008/03/26 14:32:22 momjian Exp $
+ *       $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.485 2008/03/27 03:57:33 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
 
-/*
- * Although this is not a backend module, we must include postgres.h anyway
- * so that we can include a bunch of backend include files.  pg_dump has
- * never pretended to be very independent of the backend anyhow ...
- */
-#include "postgres.h"
+#include "postgres_fe.h"
 
 #include <unistd.h>
-
 #include <ctype.h>
 #ifdef ENABLE_NLS
 #include <locale.h>
 int                    optreset;
 #endif
 
+#include "access/attnum.h"
 #include "access/htup.h"
 #include "catalog/pg_class.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_trigger.h"
 #include "catalog/pg_type.h"
-#include "commands/sequence.h"
 #include "libpq/libpq-fs.h"
 
 #include "pg_backup_archiver.h"
index 16c98c283b533c5ae1c669f6730759dd266ad14e..411c66b1a01e1065ced2207508673935e187a290 100644 (file)
@@ -3,12 +3,10 @@
  *
  * Copyright (c) 2000-2008, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.96 2008/01/01 19:45:56 momjian Exp $
- *
- * Note: we include postgres.h not postgres_fe.h so that we can include
- * catalog/pg_type.h, and thereby have access to INT4OID and similar macros.
+ * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.97 2008/03/27 03:57:34 tgl Exp $
  */
-#include "postgres.h"
+#include "postgres_fe.h"
+
 #include "print.h"
 #include "catalog/pg_type.h"
 
diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h
new file mode 100644 (file)
index 0000000..4fd3b08
--- /dev/null
@@ -0,0 +1,39 @@
+/*-------------------------------------------------------------------------
+ *
+ * genbki.h
+ *       Required include file for all POSTGRES catalog header files
+ *
+ * genbki.h defines CATALOG(), DATA(), BKI_BOOTSTRAP and related macros
+ * so that the catalog header files can be read by the C compiler.
+ * (These same words are recognized by genbki.sh to build the BKI
+ * bootstrap file from these header files.)
+ *
+ *
+ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $PostgreSQL: pgsql/src/include/catalog/genbki.h,v 1.1 2008/03/27 03:57:34 tgl Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef GENBKI_H 
+#define GENBKI_H
+
+/* Introduces a catalog's structure definition */
+#define CATALOG(name,oid)      typedef struct CppConcat(FormData_,name)
+
+/* Options that may appear after CATALOG (on the same line) */
+#define BKI_BOOTSTRAP
+#define BKI_SHARED_RELATION
+#define BKI_WITHOUT_OIDS
+
+/* Declarations that provide the initial content of a catalog */
+/* In C, these need to expand into some harmless, repeatable declaration */
+#define DATA(x)   extern int no_such_variable
+#define DESCR(x)  extern int no_such_variable
+#define SHDESCR(x) extern int no_such_variable
+
+/* PHONY type definition for use in catalog structure definitions only */
+typedef int aclitem;
+
+#endif   /* GENBKI_H */
index 74676dd432627c105f29e6f6aee4c6fac8079acd..a8b4ac2f93782a79bdfa775f326013fd8a92660b 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_aggregate.h,v 1.65 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_aggregate.h,v 1.66 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_AGGREGATE_H
 #define PG_AGGREGATE_H
 
+#include "catalog/genbki.h"
 #include "nodes/pg_list.h"
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
-
 /* ----------------------------------------------------------------
  *             pg_aggregate definition.
  *
index 81a6470754108fbc0c1c4fa737b2594bedb7ebcd..06287979d19bd6beee895df1707a436815e79770 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_am.h,v 1.53 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_am.h,v 1.54 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_AM_H
 #define PG_AM_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_am definition.  cpp turns this into
index 7505b62c720af02274a791b5a478d8100d079b05..cc211232fab493192dbcc442d7878428b3eb8734 100644 (file)
@@ -29,7 +29,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_amop.h,v 1.84 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_amop.h,v 1.85 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *      the genbki.sh script reads this file and generates .bki
 #ifndef PG_AMOP_H
 #define PG_AMOP_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_amop definition.  cpp turns this into
index 338438772b248f593b866d73ad8637a24fd9a707..8a80446953865ddb83a130ce4e16e897999ab604 100644 (file)
@@ -22,7 +22,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_amproc.h,v 1.70 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_amproc.h,v 1.71 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_AMPROC_H
 #define PG_AMPROC_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_amproc definition.  cpp turns this into
index e86dddf244d90ba4c80f23f91edb56ef8fdc8721..7d269d7f3ee46358111acf99a6da7b0dd018b522 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_attrdef.h,v 1.22 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_attrdef.h,v 1.23 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_ATTRDEF_H
 #define PG_ATTRDEF_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_attrdef definition.  cpp turns this into
index 562cd3f484312dbd915cb371707c7bc06e36e973..2a39d2a6b995710ef14e84b1995228706d5a032d 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.134 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.135 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_ATTRIBUTE_H
 #define PG_ATTRIBUTE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_attribute definition.  cpp turns this into
index d3b9693eb28ca1281cfebe868657b0571eb502f4..a81c590d0c44c8520e701e4786799f5424012295 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_auth_members.h,v 1.4 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_auth_members.h,v 1.5 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
@@ -19,6 +19,8 @@
 #ifndef PG_AUTH_MEMBERS_H
 #define PG_AUTH_MEMBERS_H
 
+#include "catalog/genbki.h"
+
 /* ----------------
  *             pg_auth_members definition.  cpp turns this into
  *             typedef struct FormData_pg_auth_members
index a8f8d1988e14fecf31ec99cb04e87b73126a473d..3af59f415d6d631036316e6482c8dc991e9462f4 100644 (file)
@@ -10,7 +10,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_authid.h,v 1.7 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_authid.h,v 1.8 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_AUTHID_H
 #define PG_AUTHID_H
 
+#include "catalog/genbki.h"
+
 /*
  * The CATALOG definition has to refer to the type of rolvaliduntil as
  * "timestamptz" (lower case) so that bootstrap mode recognizes it.  But
  * the C header files define this type as TimestampTz. Since the field is
  * potentially-null and therefore can't be accessed directly from C code,
  * there is no particular need for the C struct definition to show the
- * field type as TimestampTz --- instead we just make it Datum.
+ * field type as TimestampTz --- instead we just make it int.
  */
-
-#define timestamptz Datum
+#define timestamptz int
 
 
 /* ----------------
index 3edc3286ec56a2efd8a3986e62ee483900408fda..a12c1bab7343f9a8e2b44848b8a5a29bab0c51ff 100644 (file)
@@ -6,19 +6,14 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_autovacuum.h,v 1.8 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_autovacuum.h,v 1.9 2008/03/27 03:57:34 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef PG_AUTOVACUUM_H
 #define PG_AUTOVACUUM_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_autovacuum definition.       cpp turns this into
@@ -26,6 +21,7 @@
  * ----------------
  */
 #define AutovacuumRelationId   1248
+
 CATALOG(pg_autovacuum,1248) BKI_WITHOUT_OIDS
 {
        Oid                     vacrelid;               /* OID of table */
index c046056b0aa733a770321a07257c84509ebef233..5ad101361c93410d55dcec1447d2960a59a98fe5 100644 (file)
@@ -10,7 +10,7 @@
  *
  * Copyright (c) 2002-2008, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_cast.h,v 1.38 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_cast.h,v 1.39 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_CAST_H
 #define PG_CAST_H
 
+#include "catalog/genbki.h"
+
+/* ----------------
+ *             pg_cast definition.  cpp turns this into
+ *             typedef struct FormData_pg_cast
+ * ----------------
+ */
 #define CastRelationId 2605
 
 CATALOG(pg_cast,2605)
index a1a87e7489f86d5efbd492423bd673ce544de6d8..d1fb332e38641c7c05fe32f2194135f8a2049cbc 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.104 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_class.h,v 1.105 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_CLASS_H
 #define PG_CLASS_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_class definition.  cpp turns this into
index 4c0fd51d346630e355a6c7878d1456028ca5fd30..a05e2a4a40ee876a594d69b4dfd8a1e14ee25cc4 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.27 2008/01/17 18:56:54 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_constraint.h,v 1.28 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_CONSTRAINT_H
 #define PG_CONSTRAINT_H
 
+#include "catalog/genbki.h"
 #include "nodes/pg_list.h"
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
-
 /* ----------------
  *             pg_constraint definition.  cpp turns this into
  *             typedef struct FormData_pg_constraint
index 9220ad4fa15b4bb836366c97cc6718bf02090f5a..15fb8f9e9f0ab9b24041cf0b146f0868c2ae7d01 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_conversion.h,v 1.20 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_conversion.h,v 1.21 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_CONVERSION_H
 #define PG_CONVERSION_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------------------------------------------------------
  *             pg_conversion definition.
@@ -79,18 +74,4 @@ typedef FormData_pg_conversion *Form_pg_conversion;
  * ---------------
  */
 
-/*
- * prototypes for functions in pg_conversion.c
- */
-#include "nodes/parsenodes.h"
-
-extern Oid ConversionCreate(const char *conname, Oid connamespace,
-                                Oid conowner,
-                                int32 conforencoding, int32 contoencoding,
-                                Oid conproc, bool def);
-extern void ConversionDrop(Oid conversionOid, DropBehavior behavior);
-extern void RemoveConversionById(Oid conversionOid);
-extern Oid     FindConversion(const char *conname, Oid connamespace);
-extern Oid     FindDefaultConversion(Oid connamespace, int32 for_encoding, int32 to_encoding);
-
 #endif   /* PG_CONVERSION_H */
diff --git a/src/include/catalog/pg_conversion_fn.h b/src/include/catalog/pg_conversion_fn.h
new file mode 100644 (file)
index 0000000..8706012
--- /dev/null
@@ -0,0 +1,28 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_conversion_fn.h
+ *      prototypes for functions in catalog/pg_conversion.c
+ *
+ *
+ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $PostgreSQL: pgsql/src/include/catalog/pg_conversion_fn.h,v 1.1 2008/03/27 03:57:34 tgl Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef PG_CONVERSION_FN_H
+#define PG_CONVERSION_FN_H
+
+#include "nodes/parsenodes.h"
+
+extern Oid ConversionCreate(const char *conname, Oid connamespace,
+                                Oid conowner,
+                                int32 conforencoding, int32 contoencoding,
+                                Oid conproc, bool def);
+extern void ConversionDrop(Oid conversionOid, DropBehavior behavior);
+extern void RemoveConversionById(Oid conversionOid);
+extern Oid     FindConversion(const char *conname, Oid connamespace);
+extern Oid     FindDefaultConversion(Oid connamespace, int32 for_encoding, int32 to_encoding);
+
+#endif   /* PG_CONVERSION_FN_H */
index b42fa34f524595ac171ddd3cc7e8712bf10c2a19..ae7edefdafca11b1d07d6f7ddad930236808814b 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_database.h,v 1.46 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_database.h,v 1.47 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_DATABASE_H
 #define PG_DATABASE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_database definition.  cpp turns this into
index 65dba93f73224e8e023328e7510e564e1255acf1..68b6a48404fae72224ff156bbe0d75fd9359a98c 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_depend.h,v 1.9 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_depend.h,v 1.10 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_DEPEND_H
 #define PG_DEPEND_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_depend definition.  cpp turns this into
index bec8d1d70c150c278e8f851b4ac2482247416109..7c6a834701b84cf2f5324af8c2653dcc6a619f51 100644 (file)
@@ -22,7 +22,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_description.h,v 1.26 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_description.h,v 1.27 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_DESCRIPTION_H
 #define PG_DESCRIPTION_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_description definition.      cpp turns this into
index 241b6d38bec8bce1b6bdff3d1542415d1f892a01..3ff689a9ceaef4388c2181607ed75a320350ecf7 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Copyright (c) 2006-2008, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_enum.h,v 1.3 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_enum.h,v 1.4 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_ENUM_H
 #define PG_ENUM_H
 
+#include "catalog/genbki.h"
 #include "nodes/pg_list.h"
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
-
 /* ----------------
  *             pg_enum definition.  cpp turns this into
  *             typedef struct FormData_pg_enum
index e06505babb3605f70c1565328893a91718ae2543..9c4178d5520a475f36370f8fd2b8e766cb892fc6 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_index.h,v 1.45 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_index.h,v 1.46 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_INDEX_H
 #define PG_INDEX_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_index definition.  cpp turns this into
index 3bb8dacc4846856d5d202c5b2ed71fcb819f0064..d861def818292455b1b2eda8ed614cf190e58d62 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_inherits.h,v 1.24 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_inherits.h,v 1.25 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_INHERITS_H
 #define PG_INHERITS_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_inherits definition.  cpp turns this into
index 097cee7bed5c758d8b4645c4583dfce71948d075..bf9024e56bb059fcf02c05ec05a58a10a8dd0df7 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.32 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_language.h,v 1.33 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_LANGUAGE_H
 #define PG_LANGUAGE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_language definition.  cpp turns this into
index 38c41aa522c420e1a86e49af32dbe4d095370be0..641115f036d2fcc2e851b3e0ca54513160a2aee1 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_largeobject.h,v 1.22 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_largeobject.h,v 1.23 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_LARGEOBJECT_H
 #define PG_LARGEOBJECT_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_largeobject definition.      cpp turns this into
index 819d1fe3eebe779bb17bb1082a96e6755f8b5ae0..0fe3a8a6c82ae8d8f535ff9472927992eaeace8e 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_listener.h,v 1.23 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_listener.h,v 1.24 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_LISTENER_H
 #define PG_LISTENER_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------------------------------------------------------
  *             pg_listener definition.
index 730b0ec180b24ee544c34cd8ea0c7224c48aee95..d3e83059d1cd5dc2e4af8d92e57dbdbdb857e146 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_namespace.h,v 1.23 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_namespace.h,v 1.24 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_NAMESPACE_H
 #define PG_NAMESPACE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------------------------------------------------------
  *             pg_namespace definition.
index 9a3c4b97d7dd476c8563387f711f65af60fa5f98..72689257b7265778e3e10753c7464026a420edb7 100644 (file)
@@ -28,7 +28,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_opclass.h,v 1.79 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_opclass.h,v 1.80 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_OPCLASS_H
 #define PG_OPCLASS_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_opclass definition.  cpp turns this into
index c7f345e5a5b023926cdeddadc0e9cd6522e88288..567d95be56a0ed19fb7c5d200282e1ed7dcd2d35 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_operator.h,v 1.157 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_operator.h,v 1.158 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_OPERATOR_H
 #define PG_OPERATOR_H
 
+#include "catalog/genbki.h"
 #include "nodes/pg_list.h"
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
-
 /* ----------------
  *             pg_operator definition.  cpp turns this into
  *             typedef struct FormData_pg_operator
index 5c6100e12dce4b7c37a70abbd841ca6be7bded11..3fd314fd5266a5122289c07fba6aac992091d4ce 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_opfamily.h,v 1.7 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_opfamily.h,v 1.8 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_OPFAMILY_H
 #define PG_OPFAMILY_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_opfamily definition. cpp turns this into
index 7f42add1200f65dd44dccd5ac953b7cfb5e2a4ce..284ed39c720912094e2cb6829bfbd196d603e8ca 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.5 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_pltemplate.h,v 1.6 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_PLTEMPLATE_H
 #define PG_PLTEMPLATE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_pltemplate definition.  cpp turns this into
index b62ff0d75238d7be7fc142d1a7d8fba30d2365d6..d4d7cb5b91726e8b673a0914ad31e57cc9d4a237 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.484 2008/03/23 00:24:19 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.485 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       The script catalog/genbki.sh reads this file and generates .bki
 #ifndef PG_PROC_H
 #define PG_PROC_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_proc definition.  cpp turns this into
@@ -4443,31 +4438,4 @@ DESCR("is txid visible in snapshot?");
 #define PROARGMODE_OUT         'o'
 #define PROARGMODE_INOUT       'b'
 
-
-/*
- * prototypes for functions in pg_proc.c
- */
-extern Oid ProcedureCreate(const char *procedureName,
-                               Oid procNamespace,
-                               bool replace,
-                               bool returnsSet,
-                               Oid returnType,
-                               Oid languageObjectId,
-                               Oid languageValidator,
-                               const char *prosrc,
-                               const char *probin,
-                               bool isAgg,
-                               bool security_definer,
-                               bool isStrict,
-                               char volatility,
-                               oidvector *parameterTypes,
-                               Datum allParameterTypes,
-                               Datum parameterModes,
-                               Datum parameterNames,
-                               Datum proconfig,
-                               float4 procost,
-                               float4 prorows);
-
-extern bool function_parse_error_transpose(const char *prosrc);
-
 #endif   /* PG_PROC_H */
diff --git a/src/include/catalog/pg_proc_fn.h b/src/include/catalog/pg_proc_fn.h
new file mode 100644 (file)
index 0000000..3c17471
--- /dev/null
@@ -0,0 +1,40 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_proc_fn.h
+ *      prototypes for functions in catalog/pg_proc.c
+ *
+ *
+ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $PostgreSQL: pgsql/src/include/catalog/pg_proc_fn.h,v 1.1 2008/03/27 03:57:34 tgl Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef PG_PROC_FN_H
+#define PG_PROC_FN_H
+
+extern Oid ProcedureCreate(const char *procedureName,
+                               Oid procNamespace,
+                               bool replace,
+                               bool returnsSet,
+                               Oid returnType,
+                               Oid languageObjectId,
+                               Oid languageValidator,
+                               const char *prosrc,
+                               const char *probin,
+                               bool isAgg,
+                               bool security_definer,
+                               bool isStrict,
+                               char volatility,
+                               oidvector *parameterTypes,
+                               Datum allParameterTypes,
+                               Datum parameterModes,
+                               Datum parameterNames,
+                               Datum proconfig,
+                               float4 procost,
+                               float4 prorows);
+
+extern bool function_parse_error_transpose(const char *prosrc);
+
+#endif   /* PG_PROC_FN_H */
index 689203c96eecb711b7f77898d463cfa1ea6b1cbe..dcffbba7c14466d32e67a109529be0d2ea211df0 100644 (file)
@@ -11,7 +11,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_rewrite.h,v 1.29 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_rewrite.h,v 1.30 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_REWRITE_H
 #define PG_REWRITE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_rewrite definition.  cpp turns this into
index a257b9cd03b5f149bc091ad0de38d5701f08f686..98244ecd8a8548836ed94d8085f83242621dbc60 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_shdepend.h,v 1.6 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_shdepend.h,v 1.7 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_SHDEPEND_H
 #define PG_SHDEPEND_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_shdepend definition.  cpp turns this into
@@ -32,6 +27,7 @@
  * ----------------
  */
 #define SharedDependRelationId 1214
+
 CATALOG(pg_shdepend,1214) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 {
        /*
index 5454113490b3bfbd2809716879f2f1b68e8da1e0..75a3ce588952769f19909cc21cf24bbcaf202670 100644 (file)
@@ -15,7 +15,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_shdescription.h,v 1.5 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_shdescription.h,v 1.6 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_SHDESCRIPTION_H
 #define PG_SHDESCRIPTION_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_shdescription definition.    cpp turns this into
index 06bb22111cfc662e3492078bc2b4704396721021..d6c8c87b1c498ed24d8a8e3f2b494c99e0c085f6 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_statistic.h,v 1.34 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_statistic.h,v 1.35 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_STATISTIC_H
 #define PG_STATISTIC_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /*
- * Keep C compiler happy with anyarray, below. This will need to go elsewhere
- * if we ever use anyarray for more than pg_statistic.
+ * The CATALOG definition has to refer to the type of stavaluesN as
+ * "anyarray" so that bootstrap mode recognizes it.  There is no real
+ * typedef for that, however.  Since the fields are potentially-null and
+ * therefore can't be accessed directly from C code, there is no particular
+ * need for the C struct definition to show a valid field type --- instead
+ * we just make it int.
  */
-typedef struct varlena anyarray;
+#define anyarray int
 
 /* ----------------
  *             pg_statistic definition.  cpp turns this into
@@ -129,6 +128,9 @@ CATALOG(pg_statistic,2619) BKI_WITHOUT_OIDS
 
 #define STATISTIC_NUM_SLOTS  4
 
+#undef anyarray
+
+
 /* ----------------
  *             Form_pg_statistic corresponds to a pointer to a tuple with
  *             the format of pg_statistic relation.
index e46560b58afba577a7ed5db08f8f35db7c4d502f..64bbdaf3a67564d2d14f288543668b07a3138d4a 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_tablespace.h,v 1.10 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_tablespace.h,v 1.11 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_TABLESPACE_H
 #define PG_TABLESPACE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_tablespace definition.  cpp turns this into
index 73f4bb7c4cce93dab2980a72af224d25843f8625..84d3f69ce5398a57a122543b0721647762a9b567 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_trigger.h,v 1.30 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_trigger.h,v 1.31 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_TRIGGER_H
 #define PG_TRIGGER_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_trigger definition.  cpp turns this into
index 79a6aa5ee606525fef0c15fe7a3d685d8780570f..d9987216a5ca57eea89c276af54a948dc1ba3dec 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_ts_config.h,v 1.3 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_ts_config.h,v 1.4 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_TS_CONFIG_H
 #define PG_TS_CONFIG_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_ts_config definition.  cpp turns this into
index 34ad74fe843fcdce2edcd4c5b2734441a31e449a..14b09348187502aa1b48854b7716bdb0fa8cc9bc 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_ts_config_map.h,v 1.3 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_ts_config_map.h,v 1.4 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_TS_CONFIG_MAP_H
 #define PG_TS_CONFIG_MAP_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_ts_config_map definition.  cpp turns this into
index 19af7fe91a0ecfb2ede24806101b90bb3e7260bc..4ea9e251026a3f56fd4e05a24ba5cc9553fd8cd6 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_ts_dict.h,v 1.3 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_ts_dict.h,v 1.4 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_TS_DICT_H
 #define PG_TS_DICT_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_ts_dict definition.  cpp turns this into
index 7b187ad5f323896e5bcaed9b6cd71cf3bfe9857a..9824a19677c26da132fae52afb22ea6be698ef49 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_ts_parser.h,v 1.3 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_ts_parser.h,v 1.4 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_TS_PARSER_H
 #define PG_TS_PARSER_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_ts_parser definition.  cpp turns this into
index a709fd32f405f6f518b674400b3bf50caa327e38..cd838ef15f02ed82494e8956fe157805958930f1 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_ts_template.h,v 1.4 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_ts_template.h,v 1.5 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *             the genbki.sh script reads this file and generates .bki
 #ifndef PG_TS_TEMPLATE_H
 #define PG_TS_TEMPLATE_H
 
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_ts_template definition.      cpp turns this into
index 961f35e58976fa666a6e0649a8eb78796a19a993..8f2ca40093ff9ba62f5ebe91da5ea27dfbbc3c88 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.192 2008/03/19 18:38:30 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_type.h,v 1.193 2008/03/27 03:57:34 tgl Exp $
  *
  * NOTES
  *       the genbki.sh script reads this file and generates .bki
 #ifndef PG_TYPE_H
 #define PG_TYPE_H
 
-#include "nodes/nodes.h"
-
-/* ----------------
- *             postgres.h contains the system type definitions and the
- *             CATALOG(), BKI_BOOTSTRAP and DATA() sugar words so this file
- *             can be read by both genbki.sh and the C compiler.
- * ----------------
- */
+#include "catalog/genbki.h"
 
 /* ----------------
  *             pg_type definition.  cpp turns this into
@@ -631,63 +624,4 @@ DATA(insert OID = 3500 ( anyenum           PGNSP PGUID  4 t p t \054 0 0 0 anyenum_in any
         (typid) == ANYNONARRAYOID || \
         (typid) == ANYENUMOID)
 
-/*
- * prototypes for functions in pg_type.c
- */
-extern Oid     TypeShellMake(const char *typeName, Oid typeNamespace);
-
-extern Oid TypeCreate(Oid newTypeOid,
-                  const char *typeName,
-                  Oid typeNamespace,
-                  Oid relationOid,
-                  char relationKind,
-                  int16 internalSize,
-                  char typeType,
-                  char typDelim,
-                  Oid inputProcedure,
-                  Oid outputProcedure,
-                  Oid receiveProcedure,
-                  Oid sendProcedure,
-                  Oid typmodinProcedure,
-                  Oid typmodoutProcedure,
-                  Oid analyzeProcedure,
-                  Oid elementType,
-                  bool isImplicitArray,
-                  Oid arrayType,
-                  Oid baseType,
-                  const char *defaultTypeValue,
-                  char *defaultTypeBin,
-                  bool passedByValue,
-                  char alignment,
-                  char storage,
-                  int32 typeMod,
-                  int32 typNDims,
-                  bool typeNotNull);
-
-extern void GenerateTypeDependencies(Oid typeNamespace,
-                                                Oid typeObjectId,
-                                                Oid relationOid,
-                                                char relationKind,
-                                                Oid owner,
-                                                Oid inputProcedure,
-                                                Oid outputProcedure,
-                                                Oid receiveProcedure,
-                                                Oid sendProcedure,
-                                                Oid typmodinProcedure,
-                                                Oid typmodoutProcedure,
-                                                Oid analyzeProcedure,
-                                                Oid elementType,
-                                                bool isImplicitArray,
-                                                Oid baseType,
-                                                Node *defaultExpr,
-                                                bool rebuild);
-
-extern void RenameTypeInternal(Oid typeOid, const char *newTypeName,
-                  Oid typeNamespace);
-
-extern char *makeArrayTypeName(const char *typeName, Oid typeNamespace);
-
-extern bool moveArrayTypeName(Oid typeOid, const char *typeName,
-                                 Oid typeNamespace);
-
 #endif   /* PG_TYPE_H */
diff --git a/src/include/catalog/pg_type_fn.h b/src/include/catalog/pg_type_fn.h
new file mode 100644 (file)
index 0000000..8c06ca9
--- /dev/null
@@ -0,0 +1,76 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_type_fn.h
+ *      prototypes for functions in catalog/pg_type.c
+ *
+ *
+ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $PostgreSQL: pgsql/src/include/catalog/pg_type_fn.h,v 1.1 2008/03/27 03:57:34 tgl Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef PG_TYPE_FN_H
+#define PG_TYPE_FN_H
+
+#include "nodes/nodes.h"
+
+
+extern Oid     TypeShellMake(const char *typeName, Oid typeNamespace);
+
+extern Oid TypeCreate(Oid newTypeOid,
+                  const char *typeName,
+                  Oid typeNamespace,
+                  Oid relationOid,
+                  char relationKind,
+                  int16 internalSize,
+                  char typeType,
+                  char typDelim,
+                  Oid inputProcedure,
+                  Oid outputProcedure,
+                  Oid receiveProcedure,
+                  Oid sendProcedure,
+                  Oid typmodinProcedure,
+                  Oid typmodoutProcedure,
+                  Oid analyzeProcedure,
+                  Oid elementType,
+                  bool isImplicitArray,
+                  Oid arrayType,
+                  Oid baseType,
+                  const char *defaultTypeValue,
+                  char *defaultTypeBin,
+                  bool passedByValue,
+                  char alignment,
+                  char storage,
+                  int32 typeMod,
+                  int32 typNDims,
+                  bool typeNotNull);
+
+extern void GenerateTypeDependencies(Oid typeNamespace,
+                                                Oid typeObjectId,
+                                                Oid relationOid,
+                                                char relationKind,
+                                                Oid owner,
+                                                Oid inputProcedure,
+                                                Oid outputProcedure,
+                                                Oid receiveProcedure,
+                                                Oid sendProcedure,
+                                                Oid typmodinProcedure,
+                                                Oid typmodoutProcedure,
+                                                Oid analyzeProcedure,
+                                                Oid elementType,
+                                                bool isImplicitArray,
+                                                Oid baseType,
+                                                Node *defaultExpr,
+                                                bool rebuild);
+
+extern void RenameTypeInternal(Oid typeOid, const char *newTypeName,
+                  Oid typeNamespace);
+
+extern char *makeArrayTypeName(const char *typeName, Oid typeNamespace);
+
+extern bool moveArrayTypeName(Oid typeOid, const char *typeName,
+                                 Oid typeNamespace);
+
+#endif   /* PG_TYPE_FN_H */
index 01a5ca90a58919c029d175a259c6087d5c4c54f1..cf95b6394af1934e9b0aec66889375c0925695d3 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/commands/sequence.h,v 1.39 2008/01/01 19:45:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/commands/sequence.h,v 1.40 2008/03/27 03:57:34 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -94,13 +94,4 @@ extern void AlterSequence(AlterSeqStmt *stmt);
 extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr);
 extern void seq_desc(StringInfo buf, uint8 xl_info, char *rec);
 
-/* Set the upper and lower bounds of a sequence */
-#ifndef INT64_IS_BUSTED
-#define SEQ_MAXVALUE   INT64CONST(0x7FFFFFFFFFFFFFFF)
-#else                                                  /* INT64_IS_BUSTED */
-#define SEQ_MAXVALUE   ((int64) 0x7FFFFFFF)
-#endif   /* INT64_IS_BUSTED */
-
-#define SEQ_MINVALUE   (-SEQ_MAXVALUE)
-
 #endif   /* SEQUENCE_H */
index c0d546761a8655d0c09ac89cd3b774a0661ffb81..5eead55481e065ae68ca2d444c03ce09b205f941 100644 (file)
@@ -6,7 +6,7 @@
  * for developers.     If you edit any of these, be sure to do a *full*
  * rebuild (and an initdb if noted).
  *
- * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.29 2008/03/10 20:06:27 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.30 2008/03/27 03:57:34 tgl Exp $
  *------------------------------------------------------------------------
  */
 
  */
 #define INDEX_MAX_KEYS         32
 
+/*
+ * Set the upper and lower bounds of sequence values.
+ */
+#ifndef INT64_IS_BUSTED
+#define SEQ_MAXVALUE   INT64CONST(0x7FFFFFFFFFFFFFFF)
+#else                                                  /* INT64_IS_BUSTED */
+#define SEQ_MAXVALUE   ((int64) 0x7FFFFFFF)
+#endif   /* INT64_IS_BUSTED */
+
+#define SEQ_MINVALUE   (-SEQ_MAXVALUE)
+
 /*
  * Number of spare LWLocks to allocate for user-defined add-on code.
  */
index 3c907471928dd8fb2a6a1df917bbb08da3a3a5d4..3c4f414f643c43706a42d611053cae54478c02aa 100644 (file)
@@ -10,7 +10,7 @@
  * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
  * Portions Copyright (c) 1995, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/postgres.h,v 1.88 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/postgres.h,v 1.89 2008/03/27 03:57:34 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -26,7 +26,6 @@
  *             1)              variable-length datatypes (TOAST support)
  *             2)              datum type + support macros
  *             3)              exception handling definitions
- *             4)              genbki macros used by catalog/pg_xxx.h files
  *
  *      NOTES
  *
@@ -708,21 +707,4 @@ extern int ExceptionalCondition(const char *conditionName,
                                         const char *errorType,
                                         const char *fileName, int lineNumber);
 
-/* ----------------------------------------------------------------
- *                             Section 4: genbki macros used by catalog/pg_xxx.h files
- * ----------------------------------------------------------------
- */
-#define CATALOG(name,oid)      typedef struct CppConcat(FormData_,name)
-
-#define BKI_BOOTSTRAP
-#define BKI_SHARED_RELATION
-#define BKI_WITHOUT_OIDS
-
-/* these need to expand into some harmless, repeatable declaration */
-#define DATA(x)   extern int no_such_variable
-#define DESCR(x)  extern int no_such_variable
-#define SHDESCR(x) extern int no_such_variable
-
-typedef int4 aclitem;                  /* PHONY definition for catalog use only */
-
 #endif   /* POSTGRES_H */
index 9f928f702bb19d6b7ab2d019cd7eb31acb950885..c124d0715422cefd04ac071b022bd80f925bb880 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.122 2008/03/25 22:42:45 tgl Exp $
+ *       $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.123 2008/03/27 03:57:34 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -25,6 +25,7 @@
 #include "catalog/pg_attribute.h"
 #include "catalog/pg_class.h"
 #include "catalog/pg_proc.h"
+#include "catalog/pg_proc_fn.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "nodes/makefuncs.h"