1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

This patch wraps all accesses to t_xmin, t_cmin, t_xmax, and t_cmax in

HeapTupleHeaderData in setter and getter macros called
HeapTupleHeaderGetXmin, HeapTupleHeaderSetXmin etc.

It also introduces a "virtual" field xvac by defining
HeapTupleHeaderGetXvac and HeapTupleHeaderSetXvac.  Xvac is used by
VACUUM, in fact it is stored in t_cmin.

Manfred Koizar
This commit is contained in:
Bruce Momjian
2002-06-15 19:54:24 +00:00
parent 7882179994
commit 3c35face41
14 changed files with 312 additions and 246 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.75 2002/05/27 19:53:33 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.76 2002/06/15 19:54:23 momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
@ -439,16 +439,16 @@ heap_getsysattr(HeapTuple tup, int attnum, bool *isnull)
result = ObjectIdGetDatum(tup->t_data->t_oid);
break;
case MinTransactionIdAttributeNumber:
result = TransactionIdGetDatum(tup->t_data->t_xmin);
result = TransactionIdGetDatum(HeapTupleHeaderGetXmin(tup->t_data));
break;
case MinCommandIdAttributeNumber:
result = CommandIdGetDatum(tup->t_data->t_cmin);
result = CommandIdGetDatum(HeapTupleHeaderGetCmin(tup->t_data));
break;
case MaxTransactionIdAttributeNumber:
result = TransactionIdGetDatum(tup->t_data->t_xmax);
result = TransactionIdGetDatum(HeapTupleHeaderGetXmax(tup->t_data));
break;
case MaxCommandIdAttributeNumber:
result = CommandIdGetDatum(tup->t_data->t_cmax);
result = CommandIdGetDatum(HeapTupleHeaderGetCmax(tup->t_data));
break;
case TableOidAttributeNumber:
result = ObjectIdGetDatum(tup->t_tableOid);