git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73bcb76)
Move pg_upgrade_support global variables to their own include file
2013年12月19日 21:10:01 +0000 (16:10 -0500)
2013年12月19日 21:10:07 +0000 (16:10 -0500)
Previously their declarations were spread around to avoid accidental
access.

src/include/catalog/binary_upgrade.h [new file with mode: 0644] patch | blob

diff --git a/contrib/pg_upgrade_support/pg_upgrade_support.c b/contrib/pg_upgrade_support/pg_upgrade_support.c
index 99e64c4113f588e50ba00de62768d449858dfcac..6e30debf34e83ab524a69dcf00a8b00ef4c66faf 100644 (file)
--- a/contrib/pg_upgrade_support/pg_upgrade_support.c
+++ b/contrib/pg_upgrade_support/pg_upgrade_support.c
@@ -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"
@@ -24,17 +25,6 @@
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);
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index 6f2e1428ebe6fc317484aedb7ff25c8b02d25135..032a20e78eed98ee01f62a5acfe559635753bc65 100644 (file)
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -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"
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index aa31429b8ac7ea8ac70f3d1d04537a101b162881..7ad9720b2bb35083065d1188d4b6dcb40b933abd 100644 (file)
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -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"
diff --git a/src/backend/catalog/pg_enum.c b/src/backend/catalog/pg_enum.c
index 35899b4a9a727c63839c256496bbd085eb9add46..23d2a4158e867ea25d08ace6c77322077e7a6037 100644 (file)
--- a/src/backend/catalog/pg_enum.c
+++ b/src/backend/catalog/pg_enum.c
@@ -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"
diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c
index 23ac3dd33657006838e796825eaa601d1a103eac..634915b507afb3760ad4a01f3104c5234255a10d 100644 (file)
--- a/src/backend/catalog/pg_type.c
+++ b/src/backend/catalog/pg_type.c
@@ -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"
diff --git a/src/backend/catalog/toasting.c b/src/backend/catalog/toasting.c
index 385d64d4c07bef56130b3b85623b7baa3b4d7a09..f58e4348f44c0fd66bc403bb0af1d5258f95180e 100644 (file)
--- a/src/backend/catalog/toasting.c
+++ b/src/backend/catalog/toasting.c
@@ -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,
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index d4a14cabff28ac9949ad0f274760503654cc5d3f..959b3f2252d84cff8709b7e78203b38e76a03a33 100644 (file)
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -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"
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index e101a8669ed5b2b2f3b801201cebb71c81df2a41..ca1906df41c5c0f86674c27351db786d23edef8b 100644 (file)
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -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
+++ b/src/include/catalog/binary_upgrade.h
@@ -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 */
+
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /