Use defines rather than constants for types.

This commit is contained in:
Bruce Momjian 1998-07-20 19:21:45 +00:00
parent db48f7a153
commit 97ac8f7ffc
4 changed files with 24 additions and 18 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.53 1998/07/20 11:28:12 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.54 1998/07/20 19:21:41 momjian Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
@ -97,32 +97,32 @@ static void RemoveConstraints(Relation rel);
*/
static FormData_pg_attribute a1 = {
0xffffffff, {"ctid"}, 27, 0, sizeof(ItemPointerData),
0xffffffff, {"ctid"}, TIDOID, 0, sizeof(ItemPointerData),
SelfItemPointerAttributeNumber, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'
};
static FormData_pg_attribute a2 = {
0xffffffff, {"oid"}, 26, 0, sizeof(Oid),
0xffffffff, {"oid"}, OIDOID, 0, sizeof(Oid),
ObjectIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
};
static FormData_pg_attribute a3 = {
0xffffffff, {"xmin"}, 28, 0, sizeof(TransactionId),
0xffffffff, {"xmin"}, XIDOID, 0, sizeof(TransactionId),
MinTransactionIdAttributeNumber, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'
};
static FormData_pg_attribute a4 = {
0xffffffff, {"cmin"}, 29, 0, sizeof(CommandId),
0xffffffff, {"cmin"}, CIDOID, 0, sizeof(CommandId),
MinCommandIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
};
static FormData_pg_attribute a5 = {
0xffffffff, {"xmax"}, 28, 0, sizeof(TransactionId),
0xffffffff, {"xmax"}, XIDOID, 0, sizeof(TransactionId),
MaxTransactionIdAttributeNumber, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'
};
static FormData_pg_attribute a6 = {
0xffffffff, {"cmax"}, 29, 0, sizeof(CommandId),
0xffffffff, {"cmax"}, CIDOID, 0, sizeof(CommandId),
MaxCommandIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'
};

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.45 1998/07/12 23:41:19 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.46 1998/07/20 19:21:42 momjian Exp $
*
*
* INTERFACE ROUTINES
@ -118,12 +118,12 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
* ----------------------------------------------------------------
*/
static FormData_pg_attribute sysatts[] = {
{0, {"ctid"}, 27, 0, 6, -1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'},
{0, {"oid"}, 26, 0, 4, -2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
{0, {"xmin"}, 28, 0, 4, -3, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'},
{0, {"cmin"}, 29, 0, 4, -4, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
{0, {"xmax"}, 28, 0, 4, -5, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'},
{0, {"cmax"}, 29, 0, 4, -6, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
{0, {"ctid"}, TIDOID, 0, 6, -1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'},
{0, {"oid"}, OIDOID, 0, 4, -2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
{0, {"xmin"}, XIDOID, 0, 4, -3, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'},
{0, {"cmin"}, CIDOID, 0, 4, -4, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
{0, {"xmax"}, XIDOID, 0, 4, -5, 0, -1, -1, '\0', '\0', 'i', '\0', '\0'},
{0, {"cmax"}, CIDOID, 0, 4, -6, 0, -1, -1, '\001', '\0', 'i', '\0', '\0'},
};
/* ----------------------------------------------------------------

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.12 1998/07/12 21:29:17 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.13 1998/07/20 19:21:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -105,14 +105,14 @@ preprocess_targetlist(List *tlist,
Var *var;
resdom = makeResdom(length(t_list) + 1,
27,
TIDOID,
-1,
"ctid",
0,
0,
1);
var = makeVar(result_relation, -1, 27, -1, 0, result_relation, -1);
var = makeVar(result_relation, -1, TIDOID, -1, 0, result_relation, -1);
ctid = makeNode(TargetEntry);
ctid->resdom = resdom;

View File

@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_type.h,v 1.41 1998/07/08 14:09:00 thomas Exp $
* $Id: pg_type.h,v 1.42 1998/07/20 19:21:45 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@ -201,10 +201,16 @@ DESCR("object identifier type");
DATA(insert OID = 27 ( tid PGUID 6 19 f b t \054 0 0 tidin tidout tidin tidout i _null_ ));
DESCR("tuple identifier type, physical location of tuple");
#define TIDOID 27
DATA(insert OID = 28 ( xid PGUID 4 12 t b t \054 0 0 xidin xidout xidin xidout i _null_ ));
DESCR("transaction id");
#define XIDOID 28
DATA(insert OID = 29 ( cid PGUID 4 10 t b t \054 0 0 cidin cidout cidin cidout i _null_ ));
DESCR("command identifier type, sequence in transaction id");
#define CIDOID 29
DATA(insert OID = 30 ( oid8 PGUID 32 89 f b t \054 0 26 oid8in oid8out oid8in oid8out i _null_ ));
DESCR("array of 8 oid, used in system tables");
DATA(insert OID = 32 ( SET PGUID -1 -1 f r t \054 0 -1 textin textout textin textout i _null_ ));