mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Move pg_upgrade_support global variables to their own include file
Previously their declarations were spread around to avoid accidental access.
This commit is contained in:
parent
73bcb76b77
commit
527fdd9df1
@ -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);
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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,
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
29
src/include/catalog/binary_upgrade.h
Normal file
29
src/include/catalog/binary_upgrade.h
Normal file
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user