Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc5ec42

Browse files
author
Hiroshi Inoue
committed
Apply 7.1.3 changes to the current tree also.
1 parentc0d4d54 commitfc5ec42

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

‎src/backend/executor/execMain.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
*
2929
* IDENTIFICATION
30-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.145 2001/08/10 18:57:35 tgl Exp $
30+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.146 2001/09/08 16:15:28 inoue Exp $
3131
*
3232
*-------------------------------------------------------------------------
3333
*/
@@ -1268,6 +1268,7 @@ ExecAppend(TupleTableSlot *slot,
12681268
* insert the tuple
12691269
*/
12701270
newId=heap_insert(resultRelationDesc,tuple);
1271+
setLastTid(&(tuple->t_self));
12711272

12721273
IncrAppended();
12731274
(estate->es_processed)++;

‎src/backend/utils/adt/tid.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.25 2001/07/06 09:41:36 inoue Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.26 2001/09/08 16:15:28 inoue Exp $
1212
*
1313
* NOTES
1414
* input routine largely stolen from boxin().
@@ -124,6 +124,11 @@ tidne(PG_FUNCTION_ARGS)
124124
*
125125
*Maybe these implementations should be moved to another place
126126
*/
127+
staticItemPointerDataCurrent_last_tid= { {0,0},0};
128+
voidsetLastTid(constItemPointertid)
129+
{
130+
Current_last_tid=*tid;
131+
}
127132
Datum
128133
currtid_byreloid(PG_FUNCTION_ARGS)
129134
{
@@ -133,6 +138,11 @@ currtid_byreloid(PG_FUNCTION_ARGS)
133138
Relationrel;
134139

135140
result= (ItemPointer)palloc(sizeof(ItemPointerData));
141+
if (!reloid)
142+
{
143+
*result=Current_last_tid;
144+
PG_RETURN_ITEMPOINTER(result);
145+
}
136146
ItemPointerCopy(tid,result);
137147
if ((rel=heap_open(reloid,AccessShareLock))!=NULL)
138148
{

‎src/include/access/heapam.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: heapam.h,v 1.66 2001/07/12 04:11:13 tgl Exp $
10+
* $Id: heapam.h,v 1.67 2001/09/08 16:15:28 inoue Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -205,6 +205,7 @@ extern void heap_endscan(HeapScanDesc scan);
205205
externHeapTupleheap_getnext(HeapScanDescscandesc,intbackw);
206206
externvoidheap_fetch(Relationrelation,Snapshotsnapshot,HeapTupletup,Buffer*userbuf,IndexScanDesciscan);
207207
externItemPointerheap_get_latest_tid(Relationrelation,Snapshotsnapshot,ItemPointertid);
208+
externvoidsetLastid(constItemPointertid);
208209
externOidheap_insert(Relationrelation,HeapTupletup);
209210
externintheap_delete(Relationrelation,ItemPointertid,ItemPointerctid);
210211
externintheap_update(Relationrelation,ItemPointerotid,HeapTupletup,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp