summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/genbki.h39
-rw-r--r--src/include/catalog/pg_aggregate.h10
-rw-r--r--src/include/catalog/pg_am.h9
-rw-r--r--src/include/catalog/pg_amop.h9
-rw-r--r--src/include/catalog/pg_amproc.h9
-rw-r--r--src/include/catalog/pg_attrdef.h9
-rw-r--r--src/include/catalog/pg_attribute.h9
-rw-r--r--src/include/catalog/pg_auth_members.h4
-rw-r--r--src/include/catalog/pg_authid.h9
-rw-r--r--src/include/catalog/pg_autovacuum.h10
-rw-r--r--src/include/catalog/pg_cast.h9
-rw-r--r--src/include/catalog/pg_class.h9
-rw-r--r--src/include/catalog/pg_constraint.h10
-rw-r--r--src/include/catalog/pg_conversion.h23
-rw-r--r--src/include/catalog/pg_conversion_fn.h28
-rw-r--r--src/include/catalog/pg_database.h9
-rw-r--r--src/include/catalog/pg_depend.h9
-rw-r--r--src/include/catalog/pg_description.h9
-rw-r--r--src/include/catalog/pg_enum.h10
-rw-r--r--src/include/catalog/pg_index.h9
-rw-r--r--src/include/catalog/pg_inherits.h9
-rw-r--r--src/include/catalog/pg_language.h9
-rw-r--r--src/include/catalog/pg_largeobject.h9
-rw-r--r--src/include/catalog/pg_listener.h9
-rw-r--r--src/include/catalog/pg_namespace.h9
-rw-r--r--src/include/catalog/pg_opclass.h9
-rw-r--r--src/include/catalog/pg_operator.h10
-rw-r--r--src/include/catalog/pg_opfamily.h9
-rw-r--r--src/include/catalog/pg_pltemplate.h9
-rw-r--r--src/include/catalog/pg_proc.h36
-rw-r--r--src/include/catalog/pg_proc_fn.h40
-rw-r--r--src/include/catalog/pg_rewrite.h9
-rw-r--r--src/include/catalog/pg_shdepend.h10
-rw-r--r--src/include/catalog/pg_shdescription.h9
-rw-r--r--src/include/catalog/pg_statistic.h22
-rw-r--r--src/include/catalog/pg_tablespace.h9
-rw-r--r--src/include/catalog/pg_trigger.h9
-rw-r--r--src/include/catalog/pg_ts_config.h9
-rw-r--r--src/include/catalog/pg_ts_config_map.h9
-rw-r--r--src/include/catalog/pg_ts_dict.h9
-rw-r--r--src/include/catalog/pg_ts_parser.h9
-rw-r--r--src/include/catalog/pg_ts_template.h9
-rw-r--r--src/include/catalog/pg_type.h70
-rw-r--r--src/include/catalog/pg_type_fn.h76
-rw-r--r--src/include/commands/sequence.h11
-rw-r--r--src/include/pg_config_manual.h13
-rw-r--r--src/include/postgres.h20
47 files changed, 299 insertions, 404 deletions
diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h
new file mode 100644
index 0000000000..4fd3b08c77
--- /dev/null
+++ b/src/include/catalog/genbki.h
@@ -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 */
diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h
index 74676dd432..a8b4ac2f93 100644
--- a/src/include/catalog/pg_aggregate.h
+++ b/src/include/catalog/pg_aggregate.h
@@ -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
@@ -19,15 +19,9 @@
#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.
*
diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h
index 81a6470754..06287979d1 100644
--- a/src/include/catalog/pg_am.h
+++ b/src/include/catalog/pg_am.h
@@ -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
@@ -22,12 +22,7 @@
#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
diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h
index 7505b62c72..cc211232fa 100644
--- a/src/include/catalog/pg_amop.h
+++ b/src/include/catalog/pg_amop.h
@@ -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
@@ -40,12 +40,7 @@
#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
diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h
index 338438772b..8a80446953 100644
--- a/src/include/catalog/pg_amproc.h
+++ b/src/include/catalog/pg_amproc.h
@@ -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
@@ -33,12 +33,7 @@
#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
diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h
index e86dddf244..7d269d7f3e 100644
--- a/src/include/catalog/pg_attrdef.h
+++ b/src/include/catalog/pg_attrdef.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index 562cd3f484..2a39d2a6b9 100644
--- a/src/include/catalog/pg_attribute.h
+++ b/src/include/catalog/pg_attribute.h
@@ -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
@@ -24,12 +24,7 @@
#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
diff --git a/src/include/catalog/pg_auth_members.h b/src/include/catalog/pg_auth_members.h
index d3b9693eb2..a81c590d0c 100644
--- a/src/include/catalog/pg_auth_members.h
+++ b/src/include/catalog/pg_auth_members.h
@@ -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
diff --git a/src/include/catalog/pg_authid.h b/src/include/catalog/pg_authid.h
index a8f8d1988e..3af59f415d 100644
--- a/src/include/catalog/pg_authid.h
+++ b/src/include/catalog/pg_authid.h
@@ -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
@@ -21,16 +21,17 @@
#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
/* ----------------
diff --git a/src/include/catalog/pg_autovacuum.h b/src/include/catalog/pg_autovacuum.h
index 3edc3286ec..a12c1bab73 100644
--- a/src/include/catalog/pg_autovacuum.h
+++ b/src/include/catalog/pg_autovacuum.h
@@ -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 */
diff --git a/src/include/catalog/pg_cast.h b/src/include/catalog/pg_cast.h
index c046056b0a..5ad101361c 100644
--- a/src/include/catalog/pg_cast.h
+++ b/src/include/catalog/pg_cast.h
@@ -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
@@ -21,6 +21,13 @@
#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)
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index a1a87e7489..d1fb332e38 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h
index 4c0fd51d34..a05e2a4a40 100644
--- a/src/include/catalog/pg_constraint.h
+++ b/src/include/catalog/pg_constraint.h
@@ -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
@@ -19,16 +19,10 @@
#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
* ----------------
diff --git a/src/include/catalog/pg_conversion.h b/src/include/catalog/pg_conversion.h
index 9220ad4fa1..15fb8f9e9f 100644
--- a/src/include/catalog/pg_conversion.h
+++ b/src/include/catalog/pg_conversion.h
@@ -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
@@ -19,12 +19,7 @@
#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
index 0000000000..8706012197
--- /dev/null
+++ b/src/include/catalog/pg_conversion_fn.h
@@ -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 */
diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h
index b42fa34f52..ae7edefdaf 100644
--- a/src/include/catalog/pg_database.h
+++ b/src/include/catalog/pg_database.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_depend.h b/src/include/catalog/pg_depend.h
index 65dba93f73..68b6a48404 100644
--- a/src/include/catalog/pg_depend.h
+++ b/src/include/catalog/pg_depend.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h
index bec8d1d70c..7c6a834701 100644
--- a/src/include/catalog/pg_description.h
+++ b/src/include/catalog/pg_description.h
@@ -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
@@ -36,12 +36,7 @@
#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
diff --git a/src/include/catalog/pg_enum.h b/src/include/catalog/pg_enum.h
index 241b6d38be..3ff689a9ce 100644
--- a/src/include/catalog/pg_enum.h
+++ b/src/include/catalog/pg_enum.h
@@ -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
@@ -21,16 +21,10 @@
#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
* ----------------
diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h
index e06505babb..9c4178d552 100644
--- a/src/include/catalog/pg_index.h
+++ b/src/include/catalog/pg_index.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h
index 3bb8dacc48..d861def818 100644
--- a/src/include/catalog/pg_inherits.h
+++ b/src/include/catalog/pg_inherits.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h
index 097cee7bed..bf9024e56b 100644
--- a/src/include/catalog/pg_language.h
+++ b/src/include/catalog/pg_language.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h
index 38c41aa522..641115f036 100644
--- a/src/include/catalog/pg_largeobject.h
+++ b/src/include/catalog/pg_largeobject.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_listener.h b/src/include/catalog/pg_listener.h
index 819d1fe3ee..0fe3a8a6c8 100644
--- a/src/include/catalog/pg_listener.h
+++ b/src/include/catalog/pg_listener.h
@@ -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
@@ -18,12 +18,7 @@
#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.
diff --git a/src/include/catalog/pg_namespace.h b/src/include/catalog/pg_namespace.h
index 730b0ec180..d3e83059d1 100644
--- a/src/include/catalog/pg_namespace.h
+++ b/src/include/catalog/pg_namespace.h
@@ -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
@@ -19,12 +19,7 @@
#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.
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h
index 9a3c4b97d7..72689257b7 100644
--- a/src/include/catalog/pg_opclass.h
+++ b/src/include/catalog/pg_opclass.h
@@ -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
@@ -39,12 +39,7 @@
#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
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index c7f345e5a5..567d95be56 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -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
@@ -22,16 +22,10 @@
#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
* ----------------
diff --git a/src/include/catalog/pg_opfamily.h b/src/include/catalog/pg_opfamily.h
index 5c6100e12d..3fd314fd52 100644
--- a/src/include/catalog/pg_opfamily.h
+++ b/src/include/catalog/pg_opfamily.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h
index 7f42add120..284ed39c72 100644
--- a/src/include/catalog/pg_pltemplate.h
+++ b/src/include/catalog/pg_pltemplate.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index b62ff0d752..d4d7cb5b91 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -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
@@ -23,12 +23,7 @@
#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
index 0000000000..3c17471eb5
--- /dev/null
+++ b/src/include/catalog/pg_proc_fn.h
@@ -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 */
diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h
index 689203c96e..dcffbba7c1 100644
--- a/src/include/catalog/pg_rewrite.h
+++ b/src/include/catalog/pg_rewrite.h
@@ -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
@@ -22,12 +22,7 @@
#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
diff --git a/src/include/catalog/pg_shdepend.h b/src/include/catalog/pg_shdepend.h
index a257b9cd03..98244ecd8a 100644
--- a/src/include/catalog/pg_shdepend.h
+++ b/src/include/catalog/pg_shdepend.h
@@ -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
@@ -19,12 +19,7 @@
#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
{
/*
diff --git a/src/include/catalog/pg_shdescription.h b/src/include/catalog/pg_shdescription.h
index 5454113490..75a3ce5889 100644
--- a/src/include/catalog/pg_shdescription.h
+++ b/src/include/catalog/pg_shdescription.h
@@ -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
@@ -29,12 +29,7 @@
#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
diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h
index 06bb22111c..d6c8c87b1c 100644
--- a/src/include/catalog/pg_statistic.h
+++ b/src/include/catalog/pg_statistic.h
@@ -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
@@ -19,18 +19,17 @@
#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.
diff --git a/src/include/catalog/pg_tablespace.h b/src/include/catalog/pg_tablespace.h
index e46560b58a..64bbdaf3a6 100644
--- a/src/include/catalog/pg_tablespace.h
+++ b/src/include/catalog/pg_tablespace.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h
index 73f4bb7c4c..84d3f69ce5 100644
--- a/src/include/catalog/pg_trigger.h
+++ b/src/include/catalog/pg_trigger.h
@@ -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
@@ -19,12 +19,7 @@
#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
diff --git a/src/include/catalog/pg_ts_config.h b/src/include/catalog/pg_ts_config.h
index 79a6aa5ee6..d9987216a5 100644
--- a/src/include/catalog/pg_ts_config.h
+++ b/src/include/catalog/pg_ts_config.h
@@ -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
@@ -21,12 +21,7 @@
#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
diff --git a/src/include/catalog/pg_ts_config_map.h b/src/include/catalog/pg_ts_config_map.h
index 34ad74fe84..14b0934818 100644
--- a/src/include/catalog/pg_ts_config_map.h
+++ b/src/include/catalog/pg_ts_config_map.h
@@ -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
@@ -21,12 +21,7 @@
#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
diff --git a/src/include/catalog/pg_ts_dict.h b/src/include/catalog/pg_ts_dict.h
index 19af7fe91a..4ea9e25102 100644
--- a/src/include/catalog/pg_ts_dict.h
+++ b/src/include/catalog/pg_ts_dict.h
@@ -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
@@ -21,12 +21,7 @@
#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
diff --git a/src/include/catalog/pg_ts_parser.h b/src/include/catalog/pg_ts_parser.h
index 7b187ad5f3..9824a19677 100644
--- a/src/include/catalog/pg_ts_parser.h
+++ b/src/include/catalog/pg_ts_parser.h
@@ -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
@@ -21,12 +21,7 @@
#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
diff --git a/src/include/catalog/pg_ts_template.h b/src/include/catalog/pg_ts_template.h
index a709fd32f4..cd838ef15f 100644
--- a/src/include/catalog/pg_ts_template.h
+++ b/src/include/catalog/pg_ts_template.h
@@ -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
@@ -21,12 +21,7 @@
#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
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 961f35e589..8f2ca40093 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -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
@@ -19,14 +19,7 @@
#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
index 0000000000..8c06ca90fc
--- /dev/null
+++ b/src/include/catalog/pg_type_fn.h
@@ -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 */
diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h
index 01a5ca90a5..cf95b6394a 100644
--- a/src/include/commands/sequence.h
+++ b/src/include/commands/sequence.h
@@ -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 */
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index c0d546761a..5eead55481 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -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 $
*------------------------------------------------------------------------
*/
@@ -103,6 +103,17 @@
#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.
*/
#define NUM_USER_DEFINED_LWLOCKS 4
diff --git a/src/include/postgres.h b/src/include/postgres.h
index 3c90747192..3c4f414f64 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -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 */