summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2001-09-08 16:15:28 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2001-09-08 16:15:28 +0000
commitfc5ec424ab6b21dc9e8c8968372669fd2b73ae73 (patch)
tree883c44212c9d692b3a6e991334fb5b675b4d2c19 /src/backend
parentc0d4d5473a09cb7f6682a84abaee29e087c5886c (diff)
downloadpostgresql-fc5ec424ab6b21dc9e8c8968372669fd2b73ae73.tar.gz
Apply 7.1.3 changes to the current tree also.
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/executor/execMain.c3
-rw-r--r--src/backend/utils/adt/tid.c12
2 files changed, 13 insertions, 2 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 0375e31048..9caad11ae6 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -27,7 +27,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.145 2001/08/10 18:57:35 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.146 2001/09/08 16:15:28 inoue Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1268,6 +1268,7 @@ ExecAppend(TupleTableSlot *slot,
* insert the tuple
*/
newId = heap_insert(resultRelationDesc, tuple);
+ setLastTid(&(tuple->t_self));
IncrAppended();
(estate->es_processed)++;
diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c
index db0e864cec..a09c2f8f4d 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)
{