Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit527fdd9

Browse files
committed
Move pg_upgrade_support global variables to their own include file
Previously their declarations were spread around to avoid accidentalaccess.
1 parent73bcb76 commit527fdd9

File tree

9 files changed

+37
-13
lines changed

9 files changed

+37
-13
lines changed

‎contrib/pg_upgrade_support/pg_upgrade_support.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include"postgres.h"
1313

14+
#include"catalog/binary_upgrade.h"
1415
#include"catalog/namespace.h"
1516
#include"catalog/pg_type.h"
1617
#include"commands/extension.h"
@@ -24,17 +25,6 @@
2425
PG_MODULE_MAGIC;
2526
#endif
2627

27-
externPGDLLIMPORTOidbinary_upgrade_next_pg_type_oid;
28-
externPGDLLIMPORTOidbinary_upgrade_next_array_pg_type_oid;
29-
externPGDLLIMPORTOidbinary_upgrade_next_toast_pg_type_oid;
30-
31-
externPGDLLIMPORTOidbinary_upgrade_next_heap_pg_class_oid;
32-
externPGDLLIMPORTOidbinary_upgrade_next_index_pg_class_oid;
33-
externPGDLLIMPORTOidbinary_upgrade_next_toast_pg_class_oid;
34-
35-
externPGDLLIMPORTOidbinary_upgrade_next_pg_enum_oid;
36-
externPGDLLIMPORTOidbinary_upgrade_next_pg_authid_oid;
37-
3828
Datumset_next_pg_type_oid(PG_FUNCTION_ARGS);
3929
Datumset_next_array_pg_type_oid(PG_FUNCTION_ARGS);
4030
Datumset_next_toast_pg_type_oid(PG_FUNCTION_ARGS);

‎src/backend/catalog/heap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include"access/sysattr.h"
3535
#include"access/transam.h"
3636
#include"access/xact.h"
37+
#include"catalog/binary_upgrade.h"
3738
#include"catalog/catalog.h"
3839
#include"catalog/dependency.h"
3940
#include"catalog/heap.h"

‎src/backend/catalog/index.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include"access/visibilitymap.h"
3131
#include"access/xact.h"
3232
#include"bootstrap/bootstrap.h"
33+
#include"catalog/binary_upgrade.h"
3334
#include"catalog/catalog.h"
3435
#include"catalog/dependency.h"
3536
#include"catalog/heap.h"

‎src/backend/catalog/pg_enum.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include"access/heapam.h"
1818
#include"access/htup_details.h"
1919
#include"access/xact.h"
20+
#include"catalog/binary_upgrade.h"
2021
#include"catalog/catalog.h"
2122
#include"catalog/indexing.h"
2223
#include"catalog/pg_enum.h"

‎src/backend/catalog/pg_type.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include"access/heapam.h"
1818
#include"access/htup_details.h"
1919
#include"access/xact.h"
20+
#include"catalog/binary_upgrade.h"
2021
#include"catalog/dependency.h"
2122
#include"catalog/indexing.h"
2223
#include"catalog/objectaccess.h"

‎src/backend/catalog/toasting.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include"access/tuptoaster.h"
1818
#include"access/xact.h"
19+
#include"catalog/binary_upgrade.h"
1920
#include"catalog/dependency.h"
2021
#include"catalog/heap.h"
2122
#include"catalog/index.h"
@@ -31,8 +32,6 @@
3132
#include"utils/syscache.h"
3233

3334
/* Potentially set by contrib/pg_upgrade_support functions */
34-
externOidbinary_upgrade_next_toast_pg_class_oid;
35-
3635
Oidbinary_upgrade_next_toast_pg_type_oid=InvalidOid;
3736

3837
staticboolcreate_toast_table(Relationrel,OidtoastOid,OidtoastIndexOid,

‎src/backend/commands/typecmds.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include"access/heapam.h"
3636
#include"access/htup_details.h"
3737
#include"access/xact.h"
38+
#include"catalog/binary_upgrade.h"
3839
#include"catalog/catalog.h"
3940
#include"catalog/dependency.h"
4041
#include"catalog/heap.h"

‎src/backend/commands/user.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include"access/heapam.h"
1717
#include"access/htup_details.h"
1818
#include"access/xact.h"
19+
#include"catalog/binary_upgrade.h"
1920
#include"catalog/dependency.h"
2021
#include"catalog/indexing.h"
2122
#include"catalog/objectaccess.h"

‎src/include/catalog/binary_upgrade.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* binary_upgrade.h
4+
* variables used for binary upgrades
5+
*
6+
*
7+
* Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
8+
* Portions Copyright (c) 1994, Regents of the University of California
9+
*
10+
* src/include/catalog/binary_upgrade.h
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
#ifndefBINARY_UPGRADE_H
15+
#defineBINARY_UPGRADE_H
16+
17+
externPGDLLIMPORTOidbinary_upgrade_next_pg_type_oid;
18+
externPGDLLIMPORTOidbinary_upgrade_next_array_pg_type_oid;
19+
externPGDLLIMPORTOidbinary_upgrade_next_toast_pg_type_oid;
20+
21+
externPGDLLIMPORTOidbinary_upgrade_next_heap_pg_class_oid;
22+
externPGDLLIMPORTOidbinary_upgrade_next_index_pg_class_oid;
23+
externPGDLLIMPORTOidbinary_upgrade_next_toast_pg_class_oid;
24+
25+
externPGDLLIMPORTOidbinary_upgrade_next_pg_enum_oid;
26+
externPGDLLIMPORTOidbinary_upgrade_next_pg_authid_oid;
27+
28+
#endif/* BINARY_UPGRADE_H */
29+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp