]> granicus.if.org Git - postgresql/commitdiff
Move pg_upgrade_support global variables to their own include file
authorBruce Momjian <bruce@momjian.us>
Thu, 19 Dec 2013 21:10:01 +0000 (16:10 -0500)
committerBruce Momjian <bruce@momjian.us>
Thu, 19 Dec 2013 21:10:07 +0000 (16:10 -0500)
Previously their declarations were spread around to avoid accidental
access.

contrib/pg_upgrade_support/pg_upgrade_support.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/pg_enum.c
src/backend/catalog/pg_type.c
src/backend/catalog/toasting.c
src/backend/commands/typecmds.c
src/backend/commands/user.c
src/include/catalog/binary_upgrade.h [new file with mode: 0644]

index 99e64c4113f588e50ba00de62768d449858dfcac..6e30debf34e83ab524a69dcf00a8b00ef4c66faf 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "postgres.h"
 
+#include "catalog/binary_upgrade.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_type.h"
 #include "commands/extension.h"
 PG_MODULE_MAGIC;
 #endif
 
-extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_array_pg_type_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_type_oid;
-
-extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
-
-extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
-extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
-
 Datum          set_next_pg_type_oid(PG_FUNCTION_ARGS);
 Datum          set_next_array_pg_type_oid(PG_FUNCTION_ARGS);
 Datum          set_next_toast_pg_type_oid(PG_FUNCTION_ARGS);
index 6f2e1428ebe6fc317484aedb7ff25c8b02d25135..032a20e78eed98ee01f62a5acfe559635753bc65 100644 (file)
@@ -34,6 +34,7 @@
 #include "access/sysattr.h"
 #include "access/transam.h"
 #include "access/xact.h"
+#include "catalog/binary_upgrade.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
 #include "catalog/heap.h"
index aa31429b8ac7ea8ac70f3d1d04537a101b162881..7ad9720b2bb35083065d1188d4b6dcb40b933abd 100644 (file)
@@ -30,6 +30,7 @@
 #include "access/visibilitymap.h"
 #include "access/xact.h"
 #include "bootstrap/bootstrap.h"
+#include "catalog/binary_upgrade.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
 #include "catalog/heap.h"
index 35899b4a9a727c63839c256496bbd085eb9add46..23d2a4158e867ea25d08ace6c77322077e7a6037 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/heapam.h"
 #include "access/htup_details.h"
 #include "access/xact.h"
+#include "catalog/binary_upgrade.h"
 #include "catalog/catalog.h"
 #include "catalog/indexing.h"
 #include "catalog/pg_enum.h"
index 23ac3dd33657006838e796825eaa601d1a103eac..634915b507afb3760ad4a01f3104c5234255a10d 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/heapam.h"
 #include "access/htup_details.h"
 #include "access/xact.h"
+#include "catalog/binary_upgrade.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/objectaccess.h"
index 385d64d4c07bef56130b3b85623b7baa3b4d7a09..f58e4348f44c0fd66bc403bb0af1d5258f95180e 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "access/tuptoaster.h"
 #include "access/xact.h"
+#include "catalog/binary_upgrade.h"
 #include "catalog/dependency.h"
 #include "catalog/heap.h"
 #include "catalog/index.h"
@@ -31,8 +32,6 @@
 #include "utils/syscache.h"
 
 /* Potentially set by contrib/pg_upgrade_support functions */
-extern Oid     binary_upgrade_next_toast_pg_class_oid;
-
 Oid                    binary_upgrade_next_toast_pg_type_oid = InvalidOid;
 
 static bool create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid,
index d4a14cabff28ac9949ad0f274760503654cc5d3f..959b3f2252d84cff8709b7e78203b38e76a03a33 100644 (file)
@@ -35,6 +35,7 @@
 #include "access/heapam.h"
 #include "access/htup_details.h"
 #include "access/xact.h"
+#include "catalog/binary_upgrade.h"
 #include "catalog/catalog.h"
 #include "catalog/dependency.h"
 #include "catalog/heap.h"
index e101a8669ed5b2b2f3b801201cebb71c81df2a41..ca1906df41c5c0f86674c27351db786d23edef8b 100644 (file)
@@ -16,6 +16,7 @@
 #include "access/heapam.h"
 #include "access/htup_details.h"
 #include "access/xact.h"
+#include "catalog/binary_upgrade.h"
 #include "catalog/dependency.h"
 #include "catalog/indexing.h"
 #include "catalog/objectaccess.h"
diff --git a/src/include/catalog/binary_upgrade.h b/src/include/catalog/binary_upgrade.h
new file mode 100644 (file)
index 0000000..169d769
--- /dev/null
@@ -0,0 +1,29 @@
+/*-------------------------------------------------------------------------
+ *
+ * binary_upgrade.h
+ *       variables used for binary upgrades
+ *
+ *
+ * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/catalog/binary_upgrade.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef BINARY_UPGRADE_H
+#define BINARY_UPGRADE_H
+
+extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid;
+extern PGDLLIMPORT Oid binary_upgrade_next_array_pg_type_oid;
+extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_type_oid;
+
+extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_oid;
+extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
+extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
+
+extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
+extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
+
+#endif   /* BINARY_UPGRADE_H */
+