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

Commit6a6389a

Browse files
committed
Add index OID macro argument to DECLARE_INDEX
Instead of defining symbols such as AmOidIndexId explicitly, includethem as an argument of DECLARE_INDEX() and have genbki.pl generate theway as the table OID symbols from the CATALOG() declaration.Reviewed-by: John Naylor <john.naylor@enterprisedb.com>Discussion:https://www.postgresql.org/message-id/flat/ccef1e46-a404-25b1-9b4c-85f2c08e1f28%40enterprisedb.com
1 parent445e36a commit6a6389a

File tree

66 files changed

+133
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+133
-243
lines changed

‎src/backend/catalog/Catalog.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,16 @@ sub ParseHeader
9595
{parent_table=>$1,toast_oid=>$2,toast_index_oid=>$3 };
9696
}
9797
elsif (
98-
/^DECLARE_(UNIQUE_)?INDEX(_PKEY)?\(\s*(\w+),\s*(\d+),\s*(.+)\)/)
98+
/^DECLARE_(UNIQUE_)?INDEX(_PKEY)?\(\s*(\w+),\s*(\d+),\s*(\w+),\s*(.+)\)/)
9999
{
100100
push @{$catalog{indexing} },
101101
{
102102
is_unique=>$1 ? 1 : 0,
103103
is_pkey=>$2 ? 1 : 0,
104104
index_name=>$3,
105105
index_oid=>$4,
106-
index_decl=>$5
106+
index_oid_macro=>$5,
107+
index_decl=>$6
107108
};
108109
}
109110
elsif (

‎src/backend/catalog/genbki.pl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,14 @@
469469
printf$def "#define%s%s\n",
470470
$catalog->{rowtype_oid_macro},$catalog->{rowtype_oid}
471471
if$catalog->{rowtype_oid_macro};
472+
473+
foreach my$index (@{$catalog->{indexing} })
474+
{
475+
printf$def "#define%s%s\n",
476+
$index->{index_oid_macro},$index->{index_oid}
477+
if$index->{index_oid_macro};
478+
}
479+
472480
print$def "\n";
473481
474482
# .bki CREATE command for this catalog

‎src/backend/utils/cache/syscache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
9797
There must be a unique index underlying each syscache (ie, an index
9898
whose key is the same as that of the cache). If there is not one
99-
already, adddefinitionsfor it to include/catalog/pg_*.h: you need
100-
to add aDECLARE_UNIQUE_INDEX macro and a #define for the index OID.
99+
already, addthe definitionfor it to include/catalog/pg_*.h using
100+
DECLARE_UNIQUE_INDEX.
101101
(Adding an index requires a catversion.h update, while simply
102102
adding/deleting caches only requires a recompile.)
103103

‎src/include/catalog/genbki.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
*
7777
* The macro definitions are just to keep the C compiler from spitting up.
7878
*/
79-
#defineDECLARE_INDEX(name,oid,decl) extern int no_such_variable
80-
#defineDECLARE_UNIQUE_INDEX(name,oid,decl) extern int no_such_variable
81-
#defineDECLARE_UNIQUE_INDEX_PKEY(name,oid,decl) extern int no_such_variable
79+
#defineDECLARE_INDEX(name,oid,oidmacro,decl) extern int no_such_variable
80+
#defineDECLARE_UNIQUE_INDEX(name,oid,oidmacro,decl) extern int no_such_variable
81+
#defineDECLARE_UNIQUE_INDEX_PKEY(name,oid,oidmacro,decl) extern int no_such_variable
8282

8383
/*
8484
* These lines are processed by genbki.pl to create a table for use

‎src/include/catalog/pg_aggregate.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ typedef FormData_pg_aggregate *Form_pg_aggregate;
110110

111111
DECLARE_TOAST(pg_aggregate,4159,4160);
112112

113-
DECLARE_UNIQUE_INDEX_PKEY(pg_aggregate_fnoid_index,2650,onpg_aggregateusingbtree(aggfnoidoid_ops));
114-
#defineAggregateFnoidIndexId 2650
113+
DECLARE_UNIQUE_INDEX_PKEY(pg_aggregate_fnoid_index,2650,AggregateFnoidIndexId,onpg_aggregateusingbtree(aggfnoidoid_ops));
115114

116115
#ifdefEXPOSE_TO_CLIENT_CODE
117116

‎src/include/catalog/pg_am.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ CATALOG(pg_am,2601,AccessMethodRelationId)
4747
*/
4848
typedefFormData_pg_am*Form_pg_am;
4949

50-
DECLARE_UNIQUE_INDEX(pg_am_name_index,2651,onpg_amusingbtree(amnamename_ops));
51-
#defineAmNameIndexId 2651
52-
DECLARE_UNIQUE_INDEX_PKEY(pg_am_oid_index,2652,onpg_amusingbtree(oidoid_ops));
53-
#defineAmOidIndexId 2652
50+
DECLARE_UNIQUE_INDEX(pg_am_name_index,2651,AmNameIndexId,onpg_amusingbtree(amnamename_ops));
51+
DECLARE_UNIQUE_INDEX_PKEY(pg_am_oid_index,2652,AmOidIndexId,onpg_amusingbtree(oidoid_ops));
5452

5553
#ifdefEXPOSE_TO_CLIENT_CODE
5654

‎src/include/catalog/pg_amop.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,9 @@ CATALOG(pg_amop,2602,AccessMethodOperatorRelationId)
8787
*/
8888
typedefFormData_pg_amop*Form_pg_amop;
8989

90-
DECLARE_UNIQUE_INDEX(pg_amop_fam_strat_index,2653,onpg_amopusingbtree(amopfamilyoid_ops,amoplefttypeoid_ops,amoprighttypeoid_ops,amopstrategyint2_ops));
91-
#defineAccessMethodStrategyIndexId 2653
92-
DECLARE_UNIQUE_INDEX(pg_amop_opr_fam_index,2654,onpg_amopusingbtree(amopoproid_ops,amoppurposechar_ops,amopfamilyoid_ops));
93-
#defineAccessMethodOperatorIndexId 2654
94-
DECLARE_UNIQUE_INDEX_PKEY(pg_amop_oid_index,2756,onpg_amopusingbtree(oidoid_ops));
95-
#defineAccessMethodOperatorOidIndexId2756
90+
DECLARE_UNIQUE_INDEX(pg_amop_fam_strat_index,2653,AccessMethodStrategyIndexId,onpg_amopusingbtree(amopfamilyoid_ops,amoplefttypeoid_ops,amoprighttypeoid_ops,amopstrategyint2_ops));
91+
DECLARE_UNIQUE_INDEX(pg_amop_opr_fam_index,2654,AccessMethodOperatorIndexId,onpg_amopusingbtree(amopoproid_ops,amoppurposechar_ops,amopfamilyoid_ops));
92+
DECLARE_UNIQUE_INDEX_PKEY(pg_amop_oid_index,2756,AccessMethodOperatorOidIndexId,onpg_amopusingbtree(oidoid_ops));
9693

9794
#ifdefEXPOSE_TO_CLIENT_CODE
9895

‎src/include/catalog/pg_amproc.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId)
6767
*/
6868
typedefFormData_pg_amproc*Form_pg_amproc;
6969

70-
DECLARE_UNIQUE_INDEX(pg_amproc_fam_proc_index,2655,onpg_amprocusingbtree(amprocfamilyoid_ops,amproclefttypeoid_ops,amprocrighttypeoid_ops,amprocnumint2_ops));
71-
#defineAccessMethodProcedureIndexId 2655
72-
DECLARE_UNIQUE_INDEX_PKEY(pg_amproc_oid_index,2757,onpg_amprocusingbtree(oidoid_ops));
73-
#defineAccessMethodProcedureOidIndexId 2757
70+
DECLARE_UNIQUE_INDEX(pg_amproc_fam_proc_index,2655,AccessMethodProcedureIndexId,onpg_amprocusingbtree(amprocfamilyoid_ops,amproclefttypeoid_ops,amprocrighttypeoid_ops,amprocnumint2_ops));
71+
DECLARE_UNIQUE_INDEX_PKEY(pg_amproc_oid_index,2757,AccessMethodProcedureOidIndexId,onpg_amprocusingbtree(oidoid_ops));
7472

7573
#endif/* PG_AMPROC_H */

‎src/include/catalog/pg_attrdef.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ typedef FormData_pg_attrdef *Form_pg_attrdef;
4949

5050
DECLARE_TOAST(pg_attrdef,2830,2831);
5151

52-
DECLARE_UNIQUE_INDEX(pg_attrdef_adrelid_adnum_index,2656,onpg_attrdefusingbtree(adrelidoid_ops,adnumint2_ops));
53-
#defineAttrDefaultIndexId2656
54-
DECLARE_UNIQUE_INDEX_PKEY(pg_attrdef_oid_index,2657,onpg_attrdefusingbtree(oidoid_ops));
55-
#defineAttrDefaultOidIndexId 2657
52+
DECLARE_UNIQUE_INDEX(pg_attrdef_adrelid_adnum_index,2656,AttrDefaultIndexId,onpg_attrdefusingbtree(adrelidoid_ops,adnumint2_ops));
53+
DECLARE_UNIQUE_INDEX_PKEY(pg_attrdef_oid_index,2657,AttrDefaultOidIndexId,onpg_attrdefusingbtree(oidoid_ops));
5654

5755
DECLARE_FOREIGN_KEY((adrelid,adnum),pg_attribute, (attrelid,attnum));
5856

‎src/include/catalog/pg_attribute.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,8 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75,
206206
*/
207207
typedefFormData_pg_attribute*Form_pg_attribute;
208208

209-
DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnam_index,2658,onpg_attributeusingbtree(attrelidoid_ops,attnamename_ops));
210-
#defineAttributeRelidNameIndexId 2658
211-
DECLARE_UNIQUE_INDEX_PKEY(pg_attribute_relid_attnum_index,2659,onpg_attributeusingbtree(attrelidoid_ops,attnumint2_ops));
212-
#defineAttributeRelidNumIndexId 2659
209+
DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnam_index,2658,AttributeRelidNameIndexId,onpg_attributeusingbtree(attrelidoid_ops,attnamename_ops));
210+
DECLARE_UNIQUE_INDEX_PKEY(pg_attribute_relid_attnum_index,2659,AttributeRelidNumIndexId,onpg_attributeusingbtree(attrelidoid_ops,attnumint2_ops));
213211

214212
#ifdefEXPOSE_TO_CLIENT_CODE
215213

‎src/include/catalog/pg_auth_members.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_
4242
*/
4343
typedefFormData_pg_auth_members*Form_pg_auth_members;
4444

45-
DECLARE_UNIQUE_INDEX_PKEY(pg_auth_members_role_member_index,2694,onpg_auth_membersusingbtree(roleidoid_ops,memberoid_ops));
46-
#defineAuthMemRoleMemIndexId2694
47-
DECLARE_UNIQUE_INDEX(pg_auth_members_member_role_index,2695,onpg_auth_membersusingbtree(memberoid_ops,roleidoid_ops));
48-
#defineAuthMemMemRoleIndexId2695
45+
DECLARE_UNIQUE_INDEX_PKEY(pg_auth_members_role_member_index,2694,AuthMemRoleMemIndexId,onpg_auth_membersusingbtree(roleidoid_ops,memberoid_ops));
46+
DECLARE_UNIQUE_INDEX(pg_auth_members_member_role_index,2695,AuthMemMemRoleIndexId,onpg_auth_membersusingbtree(memberoid_ops,roleidoid_ops));
4947

5048
#endif/* PG_AUTH_MEMBERS_H */

‎src/include/catalog/pg_authid.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ DECLARE_TOAST(pg_authid, 4175, 4176);
5959
#definePgAuthidToastTable 4175
6060
#definePgAuthidToastIndex 4176
6161

62-
DECLARE_UNIQUE_INDEX(pg_authid_rolname_index,2676,onpg_authidusingbtree(rolnamename_ops));
63-
#defineAuthIdRolnameIndexId2676
64-
DECLARE_UNIQUE_INDEX_PKEY(pg_authid_oid_index,2677,onpg_authidusingbtree(oidoid_ops));
65-
#defineAuthIdOidIndexId2677
62+
DECLARE_UNIQUE_INDEX(pg_authid_rolname_index,2676,AuthIdRolnameIndexId,onpg_authidusingbtree(rolnamename_ops));
63+
DECLARE_UNIQUE_INDEX_PKEY(pg_authid_oid_index,2677,AuthIdOidIndexId,onpg_authidusingbtree(oidoid_ops));
6664

6765
#endif/* PG_AUTHID_H */

‎src/include/catalog/pg_cast.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ CATALOG(pg_cast,2605,CastRelationId)
5656
*/
5757
typedefFormData_pg_cast*Form_pg_cast;
5858

59-
DECLARE_UNIQUE_INDEX_PKEY(pg_cast_oid_index,2660,onpg_castusingbtree(oidoid_ops));
60-
#defineCastOidIndexId2660
61-
DECLARE_UNIQUE_INDEX(pg_cast_source_target_index,2661,onpg_castusingbtree(castsourceoid_ops,casttargetoid_ops));
62-
#defineCastSourceTargetIndexId 2661
59+
DECLARE_UNIQUE_INDEX_PKEY(pg_cast_oid_index,2660,CastOidIndexId,onpg_castusingbtree(oidoid_ops));
60+
DECLARE_UNIQUE_INDEX(pg_cast_source_target_index,2661,CastSourceTargetIndexId,onpg_castusingbtree(castsourceoid_ops,casttargetoid_ops));
6361

6462
#ifdefEXPOSE_TO_CLIENT_CODE
6563

‎src/include/catalog/pg_class.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,9 @@ CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,Relat
152152
*/
153153
typedefFormData_pg_class*Form_pg_class;
154154

155-
DECLARE_UNIQUE_INDEX_PKEY(pg_class_oid_index,2662,onpg_classusingbtree(oidoid_ops));
156-
#defineClassOidIndexId2662
157-
DECLARE_UNIQUE_INDEX(pg_class_relname_nsp_index,2663,onpg_classusingbtree(relnamename_ops,relnamespaceoid_ops));
158-
#defineClassNameNspIndexId2663
159-
DECLARE_INDEX(pg_class_tblspc_relfilenode_index,3455,onpg_classusingbtree(reltablespaceoid_ops,relfilenodeoid_ops));
160-
#defineClassTblspcRelfilenodeIndexId3455
155+
DECLARE_UNIQUE_INDEX_PKEY(pg_class_oid_index,2662,ClassOidIndexId,onpg_classusingbtree(oidoid_ops));
156+
DECLARE_UNIQUE_INDEX(pg_class_relname_nsp_index,2663,ClassNameNspIndexId,onpg_classusingbtree(relnamename_ops,relnamespaceoid_ops));
157+
DECLARE_INDEX(pg_class_tblspc_relfilenode_index,3455,ClassTblspcRelfilenodeIndexId,onpg_classusingbtree(reltablespaceoid_ops,relfilenodeoid_ops));
161158

162159
#ifdefEXPOSE_TO_CLIENT_CODE
163160

‎src/include/catalog/pg_collation.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,8 @@ typedef FormData_pg_collation *Form_pg_collation;
5757

5858
DECLARE_TOAST(pg_collation,6175,6176);
5959

60-
DECLARE_UNIQUE_INDEX(pg_collation_name_enc_nsp_index,3164,onpg_collationusingbtree(collnamename_ops,collencodingint4_ops,collnamespaceoid_ops));
61-
#defineCollationNameEncNspIndexId3164
62-
DECLARE_UNIQUE_INDEX_PKEY(pg_collation_oid_index,3085,onpg_collationusingbtree(oidoid_ops));
63-
#defineCollationOidIndexId3085
60+
DECLARE_UNIQUE_INDEX(pg_collation_name_enc_nsp_index,3164,CollationNameEncNspIndexId,onpg_collationusingbtree(collnamename_ops,collencodingint4_ops,collnamespaceoid_ops));
61+
DECLARE_UNIQUE_INDEX_PKEY(pg_collation_oid_index,3085,CollationOidIndexId,onpg_collationusingbtree(oidoid_ops));
6462

6563
#ifdefEXPOSE_TO_CLIENT_CODE
6664

‎src/include/catalog/pg_constraint.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,11 @@ typedef FormData_pg_constraint *Form_pg_constraint;
160160

161161
DECLARE_TOAST(pg_constraint,2832,2833);
162162

163-
DECLARE_INDEX(pg_constraint_conname_nsp_index,2664,onpg_constraintusingbtree(connamename_ops,connamespaceoid_ops));
164-
#defineConstraintNameNspIndexId 2664
165-
DECLARE_UNIQUE_INDEX(pg_constraint_conrelid_contypid_conname_index,2665,onpg_constraintusingbtree(conrelidoid_ops,contypidoid_ops,connamename_ops));
166-
#defineConstraintRelidTypidNameIndexId2665
167-
DECLARE_INDEX(pg_constraint_contypid_index,2666,onpg_constraintusingbtree(contypidoid_ops));
168-
#defineConstraintTypidIndexId2666
169-
DECLARE_UNIQUE_INDEX_PKEY(pg_constraint_oid_index,2667,onpg_constraintusingbtree(oidoid_ops));
170-
#defineConstraintOidIndexId 2667
171-
DECLARE_INDEX(pg_constraint_conparentid_index,2579,onpg_constraintusingbtree(conparentidoid_ops));
172-
#defineConstraintParentIndexId2579
163+
DECLARE_INDEX(pg_constraint_conname_nsp_index,2664,ConstraintNameNspIndexId,onpg_constraintusingbtree(connamename_ops,connamespaceoid_ops));
164+
DECLARE_UNIQUE_INDEX(pg_constraint_conrelid_contypid_conname_index,2665,ConstraintRelidTypidNameIndexId,onpg_constraintusingbtree(conrelidoid_ops,contypidoid_ops,connamename_ops));
165+
DECLARE_INDEX(pg_constraint_contypid_index,2666,ConstraintTypidIndexId,onpg_constraintusingbtree(contypidoid_ops));
166+
DECLARE_UNIQUE_INDEX_PKEY(pg_constraint_oid_index,2667,ConstraintOidIndexId,onpg_constraintusingbtree(oidoid_ops));
167+
DECLARE_INDEX(pg_constraint_conparentid_index,2579,ConstraintParentIndexId,onpg_constraintusingbtree(conparentidoid_ops));
173168

174169
/* conkey can contain zero (InvalidAttrNumber) if a whole-row Var is used */
175170
DECLARE_ARRAY_FOREIGN_KEY_OPT((conrelid,conkey),pg_attribute, (attrelid,attnum));

‎src/include/catalog/pg_conversion.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ CATALOG(pg_conversion,2607,ConversionRelationId)
6060
*/
6161
typedefFormData_pg_conversion*Form_pg_conversion;
6262

63-
DECLARE_UNIQUE_INDEX(pg_conversion_default_index,2668,onpg_conversionusingbtree(connamespaceoid_ops,conforencodingint4_ops,contoencodingint4_ops,oidoid_ops));
64-
#defineConversionDefaultIndexId2668
65-
DECLARE_UNIQUE_INDEX(pg_conversion_name_nsp_index,2669,onpg_conversionusingbtree(connamename_ops,connamespaceoid_ops));
66-
#defineConversionNameNspIndexId2669
67-
DECLARE_UNIQUE_INDEX_PKEY(pg_conversion_oid_index,2670,onpg_conversionusingbtree(oidoid_ops));
68-
#defineConversionOidIndexId2670
63+
DECLARE_UNIQUE_INDEX(pg_conversion_default_index,2668,ConversionDefaultIndexId,onpg_conversionusingbtree(connamespaceoid_ops,conforencodingint4_ops,contoencodingint4_ops,oidoid_ops));
64+
DECLARE_UNIQUE_INDEX(pg_conversion_name_nsp_index,2669,ConversionNameNspIndexId,onpg_conversionusingbtree(connamename_ops,connamespaceoid_ops));
65+
DECLARE_UNIQUE_INDEX_PKEY(pg_conversion_oid_index,2670,ConversionOidIndexId,onpg_conversionusingbtree(oidoid_ops));
6966

7067

7168
externObjectAddressConversionCreate(constchar*conname,Oidconnamespace,

‎src/include/catalog/pg_database.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ DECLARE_TOAST(pg_database, 4177, 4178);
8484
#definePgDatabaseToastTable4177
8585
#definePgDatabaseToastIndex4178
8686

87-
DECLARE_UNIQUE_INDEX(pg_database_datname_index,2671,onpg_databaseusingbtree(datnamename_ops));
88-
#defineDatabaseNameIndexId2671
89-
DECLARE_UNIQUE_INDEX_PKEY(pg_database_oid_index,2672,onpg_databaseusingbtree(oidoid_ops));
90-
#defineDatabaseOidIndexId2672
87+
DECLARE_UNIQUE_INDEX(pg_database_datname_index,2671,DatabaseNameIndexId,onpg_databaseusingbtree(datnamename_ops));
88+
DECLARE_UNIQUE_INDEX_PKEY(pg_database_oid_index,2672,DatabaseOidIndexId,onpg_databaseusingbtree(oidoid_ops));
9189

9290
#endif/* PG_DATABASE_H */

‎src/include/catalog/pg_db_role_setting.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ DECLARE_TOAST(pg_db_role_setting, 2966, 2967);
5050
#definePgDbRoleSettingToastTable 2966
5151
#definePgDbRoleSettingToastIndex 2967
5252

53-
DECLARE_UNIQUE_INDEX_PKEY(pg_db_role_setting_databaseid_rol_index,2965,onpg_db_role_settingusingbtree(setdatabaseoid_ops,setroleoid_ops));
54-
#defineDbRoleSettingDatidRolidIndexId2965
53+
DECLARE_UNIQUE_INDEX_PKEY(pg_db_role_setting_databaseid_rol_index,2965,DbRoleSettingDatidRolidIndexId,onpg_db_role_settingusingbtree(setdatabaseoid_ops,setroleoid_ops));
5554

5655
/*
5756
* prototypes for functions in pg_db_role_setting.h

‎src/include/catalog/pg_default_acl.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ typedef FormData_pg_default_acl *Form_pg_default_acl;
5151

5252
DECLARE_TOAST(pg_default_acl,4143,4144);
5353

54-
DECLARE_UNIQUE_INDEX(pg_default_acl_role_nsp_obj_index,827,onpg_default_aclusingbtree(defaclroleoid_ops,defaclnamespaceoid_ops,defaclobjtypechar_ops));
55-
#defineDefaultAclRoleNspObjIndexId 827
56-
DECLARE_UNIQUE_INDEX_PKEY(pg_default_acl_oid_index,828,onpg_default_aclusingbtree(oidoid_ops));
57-
#defineDefaultAclOidIndexId828
54+
DECLARE_UNIQUE_INDEX(pg_default_acl_role_nsp_obj_index,827,DefaultAclRoleNspObjIndexId,onpg_default_aclusingbtree(defaclroleoid_ops,defaclnamespaceoid_ops,defaclobjtypechar_ops));
55+
DECLARE_UNIQUE_INDEX_PKEY(pg_default_acl_oid_index,828,DefaultAclOidIndexId,onpg_default_aclusingbtree(oidoid_ops));
5856

5957
#ifdefEXPOSE_TO_CLIENT_CODE
6058

‎src/include/catalog/pg_depend.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ CATALOG(pg_depend,2608,DependRelationId)
7272
*/
7373
typedefFormData_pg_depend*Form_pg_depend;
7474

75-
DECLARE_INDEX(pg_depend_depender_index,2673,onpg_dependusingbtree(classidoid_ops,objidoid_ops,objsubidint4_ops));
76-
#defineDependDependerIndexId 2673
77-
DECLARE_INDEX(pg_depend_reference_index,2674,onpg_dependusingbtree(refclassidoid_ops,refobjidoid_ops,refobjsubidint4_ops));
78-
#defineDependReferenceIndexId2674
75+
DECLARE_INDEX(pg_depend_depender_index,2673,DependDependerIndexId,onpg_dependusingbtree(classidoid_ops,objidoid_ops,objsubidint4_ops));
76+
DECLARE_INDEX(pg_depend_reference_index,2674,DependReferenceIndexId,onpg_dependusingbtree(refclassidoid_ops,refobjidoid_ops,refobjsubidint4_ops));
7977

8078
#endif/* PG_DEPEND_H */

‎src/include/catalog/pg_description.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ typedef FormData_pg_description * Form_pg_description;
6565

6666
DECLARE_TOAST(pg_description,2834,2835);
6767

68-
DECLARE_UNIQUE_INDEX_PKEY(pg_description_o_c_o_index,2675,onpg_descriptionusingbtree(objoidoid_ops,classoidoid_ops,objsubidint4_ops));
69-
#defineDescriptionObjIndexId 2675
68+
DECLARE_UNIQUE_INDEX_PKEY(pg_description_o_c_o_index,2675,DescriptionObjIndexId,onpg_descriptionusingbtree(objoidoid_ops,classoidoid_ops,objsubidint4_ops));
7069

7170
/* We do not use BKI_LOOKUP here because it causes problems for genbki.pl */
7271
DECLARE_FOREIGN_KEY((classoid),pg_class, (oid));

‎src/include/catalog/pg_enum.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,9 @@ CATALOG(pg_enum,3501,EnumRelationId)
4343
*/
4444
typedefFormData_pg_enum*Form_pg_enum;
4545

46-
DECLARE_UNIQUE_INDEX_PKEY(pg_enum_oid_index,3502,onpg_enumusingbtree(oidoid_ops));
47-
#defineEnumOidIndexId3502
48-
DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index,3503,onpg_enumusingbtree(enumtypidoid_ops,enumlabelname_ops));
49-
#defineEnumTypIdLabelIndexId 3503
50-
DECLARE_UNIQUE_INDEX(pg_enum_typid_sortorder_index,3534,onpg_enumusingbtree(enumtypidoid_ops,enumsortorderfloat4_ops));
51-
#defineEnumTypIdSortOrderIndexId 3534
46+
DECLARE_UNIQUE_INDEX_PKEY(pg_enum_oid_index,3502,EnumOidIndexId,onpg_enumusingbtree(oidoid_ops));
47+
DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index,3503,EnumTypIdLabelIndexId,onpg_enumusingbtree(enumtypidoid_ops,enumlabelname_ops));
48+
DECLARE_UNIQUE_INDEX(pg_enum_typid_sortorder_index,3534,EnumTypIdSortOrderIndexId,onpg_enumusingbtree(enumtypidoid_ops,enumsortorderfloat4_ops));
5249

5350
/*
5451
* prototypes for functions in pg_enum.c

‎src/include/catalog/pg_event_trigger.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ typedef FormData_pg_event_trigger *Form_pg_event_trigger;
5151

5252
DECLARE_TOAST(pg_event_trigger,4145,4146);
5353

54-
DECLARE_UNIQUE_INDEX(pg_event_trigger_evtname_index,3467,onpg_event_triggerusingbtree(evtnamename_ops));
55-
#defineEventTriggerNameIndexId 3467
56-
DECLARE_UNIQUE_INDEX_PKEY(pg_event_trigger_oid_index,3468,onpg_event_triggerusingbtree(oidoid_ops));
57-
#defineEventTriggerOidIndexId3468
54+
DECLARE_UNIQUE_INDEX(pg_event_trigger_evtname_index,3467,EventTriggerNameIndexId,onpg_event_triggerusingbtree(evtnamename_ops));
55+
DECLARE_UNIQUE_INDEX_PKEY(pg_event_trigger_oid_index,3468,EventTriggerOidIndexId,onpg_event_triggerusingbtree(oidoid_ops));
5856

5957
#endif/* PG_EVENT_TRIGGER_H */

‎src/include/catalog/pg_extension.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ typedef FormData_pg_extension *Form_pg_extension;
5353

5454
DECLARE_TOAST(pg_extension,4147,4148);
5555

56-
DECLARE_UNIQUE_INDEX_PKEY(pg_extension_oid_index,3080,onpg_extensionusingbtree(oidoid_ops));
57-
#defineExtensionOidIndexId 3080
58-
DECLARE_UNIQUE_INDEX(pg_extension_name_index,3081,onpg_extensionusingbtree(extnamename_ops));
59-
#defineExtensionNameIndexId 3081
56+
DECLARE_UNIQUE_INDEX_PKEY(pg_extension_oid_index,3080,ExtensionOidIndexId,onpg_extensionusingbtree(oidoid_ops));
57+
DECLARE_UNIQUE_INDEX(pg_extension_name_index,3081,ExtensionNameIndexId,onpg_extensionusingbtree(extnamename_ops));
6058

6159
#endif/* PG_EXTENSION_H */

‎src/include/catalog/pg_foreign_data_wrapper.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ typedef FormData_pg_foreign_data_wrapper *Form_pg_foreign_data_wrapper;
5252

5353
DECLARE_TOAST(pg_foreign_data_wrapper,4149,4150);
5454

55-
DECLARE_UNIQUE_INDEX_PKEY(pg_foreign_data_wrapper_oid_index,112,onpg_foreign_data_wrapperusingbtree(oidoid_ops));
56-
#defineForeignDataWrapperOidIndexId112
57-
DECLARE_UNIQUE_INDEX(pg_foreign_data_wrapper_name_index,548,onpg_foreign_data_wrapperusingbtree(fdwnamename_ops));
58-
#defineForeignDataWrapperNameIndexId548
55+
DECLARE_UNIQUE_INDEX_PKEY(pg_foreign_data_wrapper_oid_index,112,ForeignDataWrapperOidIndexId,onpg_foreign_data_wrapperusingbtree(oidoid_ops));
56+
DECLARE_UNIQUE_INDEX(pg_foreign_data_wrapper_name_index,548,ForeignDataWrapperNameIndexId,onpg_foreign_data_wrapperusingbtree(fdwnamename_ops));
5957

6058
#endif/* PG_FOREIGN_DATA_WRAPPER_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp