diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-11-27 19:52:36 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1998-11-27 19:52:36 +0000 |
commit | 6beba218d7f6f764e946751df6dc0d0180da05fa (patch) | |
tree | 2801029d61d798d6150bb43a24561a4615aedb8b /src/backend/utils/misc/database.c | |
parent | 2435c7d501b0a3129f6fc597a9c85863541cd596 (diff) | |
download | postgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.tar.gz postgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.zip |
New HeapTuple structure/interface.
Diffstat (limited to 'src/backend/utils/misc/database.c')
-rw-r--r-- | src/backend/utils/misc/database.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/misc/database.c b/src/backend/utils/misc/database.c index 6ea7b0c9ca2..60f6499872e 100644 --- a/src/backend/utils/misc/database.c +++ b/src/backend/utils/misc/database.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.20 1998/09/03 02:32:41 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.21 1998/11/27 19:52:29 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -188,7 +188,7 @@ GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encodin int nbytes; int max, i; - HeapTuple tup; + HeapTupleData tup; Page pg; PageHeader ph; char *dbfname; @@ -238,7 +238,7 @@ GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encodin /* get a pointer to the tuple itself */ offset = (int) ph->pd_linp[i].lp_off; - tup = (HeapTuple) (((char *) pg) + offset); + tup.t_data = (HeapTupleHeader) (((char *) pg) + offset); /* * if the tuple has been deleted (the database was destroyed), @@ -253,7 +253,7 @@ GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encodin * if data is ever moved and no longer the first field this * will be broken!! -mer 11 Nov 1991. */ - if (TransactionIdIsValid((TransactionId) tup->t_xmax)) + if (TransactionIdIsValid((TransactionId) tup.t_data->t_xmax)) continue; /* @@ -267,7 +267,7 @@ GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encodin * you exactly how big the header actually is. use the PC * means of getting at sys cat attrs. */ - tup_db = (Form_pg_database) GETSTRUCT(tup); + tup_db = (Form_pg_database) GETSTRUCT(&tup); #ifdef MULTIBYTE /* @@ -279,7 +279,7 @@ GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encodin #endif if (strcmp(name, tup_db->datname.data) == 0) { - *db_id = tup->t_oid; + *db_id = tup.t_data->t_oid; strncpy(path, VARDATA(&(tup_db->datpath)), (VARSIZE(&(tup_db->datpath)) - VARHDRSZ)); *(path + VARSIZE(&(tup_db->datpath)) - VARHDRSZ) = '\0'; |