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

Commit97ac8f7

Browse files
committed
Use defines rather than constants for types.
1 parentdb48f7a commit97ac8f7

File tree

4 files changed

+24
-18
lines changed

4 files changed

+24
-18
lines changed

‎src/backend/catalog/heap.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.53 1998/07/2011:28:12 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.54 1998/07/2019:21:41 momjian Exp $
1111
*
1212
* INTERFACE ROUTINES
1313
*heap_create()- Create an uncataloged heap relation
@@ -97,32 +97,32 @@ static void RemoveConstraints(Relation rel);
9797
*/
9898

9999
staticFormData_pg_attributea1= {
100-
0xffffffff, {"ctid"},27,0,sizeof(ItemPointerData),
100+
0xffffffff, {"ctid"},TIDOID,0,sizeof(ItemPointerData),
101101
SelfItemPointerAttributeNumber,0,-1,-1,'\0','\0','i','\0','\0'
102102
};
103103

104104
staticFormData_pg_attributea2= {
105-
0xffffffff, {"oid"},26,0,sizeof(Oid),
105+
0xffffffff, {"oid"},OIDOID,0,sizeof(Oid),
106106
ObjectIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
107107
};
108108

109109
staticFormData_pg_attributea3= {
110-
0xffffffff, {"xmin"},28,0,sizeof(TransactionId),
110+
0xffffffff, {"xmin"},XIDOID,0,sizeof(TransactionId),
111111
MinTransactionIdAttributeNumber,0,-1,-1,'\0','\0','i','\0','\0'
112112
};
113113

114114
staticFormData_pg_attributea4= {
115-
0xffffffff, {"cmin"},29,0,sizeof(CommandId),
115+
0xffffffff, {"cmin"},CIDOID,0,sizeof(CommandId),
116116
MinCommandIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
117117
};
118118

119119
staticFormData_pg_attributea5= {
120-
0xffffffff, {"xmax"},28,0,sizeof(TransactionId),
120+
0xffffffff, {"xmax"},XIDOID,0,sizeof(TransactionId),
121121
MaxTransactionIdAttributeNumber,0,-1,-1,'\0','\0','i','\0','\0'
122122
};
123123

124124
staticFormData_pg_attributea6= {
125-
0xffffffff, {"cmax"},29,0,sizeof(CommandId),
125+
0xffffffff, {"cmax"},CIDOID,0,sizeof(CommandId),
126126
MaxCommandIdAttributeNumber,0,-1,-1,'\001','\0','i','\0','\0'
127127
};
128128

‎src/backend/catalog/index.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.45 1998/07/12 23:41:19 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.46 1998/07/20 19:21:42 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -118,12 +118,12 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
118118
* ----------------------------------------------------------------
119119
*/
120120
staticFormData_pg_attributesysatts[]= {
121-
{0, {"ctid"},27,0,6,-1,0,-1,-1,'\0','\0','i','\0','\0'},
122-
{0, {"oid"},26,0,4,-2,0,-1,-1,'\001','\0','i','\0','\0'},
123-
{0, {"xmin"},28,0,4,-3,0,-1,-1,'\0','\0','i','\0','\0'},
124-
{0, {"cmin"},29,0,4,-4,0,-1,-1,'\001','\0','i','\0','\0'},
125-
{0, {"xmax"},28,0,4,-5,0,-1,-1,'\0','\0','i','\0','\0'},
126-
{0, {"cmax"},29,0,4,-6,0,-1,-1,'\001','\0','i','\0','\0'},
121+
{0, {"ctid"},TIDOID,0,6,-1,0,-1,-1,'\0','\0','i','\0','\0'},
122+
{0, {"oid"},OIDOID,0,4,-2,0,-1,-1,'\001','\0','i','\0','\0'},
123+
{0, {"xmin"},XIDOID,0,4,-3,0,-1,-1,'\0','\0','i','\0','\0'},
124+
{0, {"cmin"},CIDOID,0,4,-4,0,-1,-1,'\001','\0','i','\0','\0'},
125+
{0, {"xmax"},XIDOID,0,4,-5,0,-1,-1,'\0','\0','i','\0','\0'},
126+
{0, {"cmax"},CIDOID,0,4,-6,0,-1,-1,'\001','\0','i','\0','\0'},
127127
};
128128

129129
/* ----------------------------------------------------------------

‎src/backend/optimizer/prep/preptlist.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.12 1998/07/1221:29:17 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.13 1998/07/20 19:21:44 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -105,14 +105,14 @@ preprocess_targetlist(List *tlist,
105105
Var*var;
106106

107107
resdom=makeResdom(length(t_list)+1,
108-
27,
108+
TIDOID,
109109
-1,
110110
"ctid",
111111
0,
112112
0,
113113
1);
114114

115-
var=makeVar(result_relation,-1,27,-1,0,result_relation,-1);
115+
var=makeVar(result_relation,-1,TIDOID,-1,0,result_relation,-1);
116116

117117
ctid=makeNode(TargetEntry);
118118
ctid->resdom=resdom;

‎src/include/catalog/pg_type.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_type.h,v 1.41 1998/07/08 14:09:00 thomas Exp $
10+
* $Id: pg_type.h,v 1.42 1998/07/20 19:21:45 momjian Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -201,10 +201,16 @@ DESCR("object identifier type");
201201

202202
DATA(insertOID=27 (tidPGUID619fbt \05400tidintidouttidintidouti_null_ ));
203203
DESCR("tuple identifier type, physical location of tuple");
204+
#defineTIDOID27
205+
204206
DATA(insertOID=28 (xidPGUID412tbt \05400xidinxidoutxidinxidouti_null_ ));
205207
DESCR("transaction id");
208+
#defineXIDOID 28
209+
206210
DATA(insertOID=29 (cidPGUID410tbt \05400cidincidoutcidincidouti_null_ ));
207211
DESCR("command identifier type, sequence in transaction id");
212+
#defineCIDOID 29
213+
208214
DATA(insertOID=30 (oid8PGUID3289fbt \054026oid8inoid8outoid8inoid8outi_null_ ));
209215
DESCR("array of 8 oid, used in system tables");
210216
DATA(insertOID=32 (SETPGUID-1-1frt \0540-1textintextouttextintextouti_null_ ));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp