From fc5ec424ab6b21dc9e8c8968372669fd2b73ae73 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Sat, 8 Sep 2001 16:15:28 +0000 Subject: Apply 7.1.3 changes to the current tree also. --- src/backend/utils/adt/tid.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/backend/utils/adt/tid.c') diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c index db0e864cecf..a09c2f8f4d7 100644 --- a/src/backend/utils/adt/tid.c +++ b/src/backend/utils/adt/tid.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.25 2001/07/06 09:41:36 inoue Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.26 2001/09/08 16:15:28 inoue Exp $ * * NOTES * input routine largely stolen from boxin(). @@ -124,6 +124,11 @@ tidne(PG_FUNCTION_ARGS) * * Maybe these implementations should be moved to another place */ +static ItemPointerData Current_last_tid = { {0, 0}, 0}; +void setLastTid(const ItemPointer tid) +{ + Current_last_tid = *tid; +} Datum currtid_byreloid(PG_FUNCTION_ARGS) { @@ -133,6 +138,11 @@ currtid_byreloid(PG_FUNCTION_ARGS) Relation rel; result = (ItemPointer) palloc(sizeof(ItemPointerData)); + if (!reloid) + { + *result = Current_last_tid; + PG_RETURN_ITEMPOINTER(result); + } ItemPointerCopy(tid, result); if ((rel = heap_open(reloid, AccessShareLock)) != NULL) { -- cgit v1.2.3