mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff;
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.25 1998/07/27 19:37:41 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.26 1998/08/19 02:01:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -86,7 +86,6 @@ rtbuild(Relation heap,
|
||||
PredInfo *predInfo)
|
||||
{
|
||||
HeapScanDesc scan;
|
||||
Buffer buffer;
|
||||
AttrNumber i;
|
||||
HeapTuple htup;
|
||||
IndexTuple itup;
|
||||
@@ -95,6 +94,7 @@ rtbuild(Relation heap,
|
||||
InsertIndexResult res;
|
||||
Datum *d;
|
||||
bool *nulls;
|
||||
Buffer buffer = InvalidBuffer;
|
||||
int nb,
|
||||
nh,
|
||||
ni;
|
||||
@@ -164,15 +164,14 @@ rtbuild(Relation heap,
|
||||
slot = NULL;
|
||||
}
|
||||
#endif /* OMIT_PARTIAL_INDEX */
|
||||
scan = heap_beginscan(heap, 0, SnapshotNow, 0, (ScanKey) NULL);
|
||||
htup = heap_getnext(scan, 0, &buffer);
|
||||
|
||||
/* count the tuples as we insert them */
|
||||
nh = ni = 0;
|
||||
|
||||
for (; HeapTupleIsValid(htup); htup = heap_getnext(scan, 0, &buffer))
|
||||
{
|
||||
scan = heap_beginscan(heap, 0, SnapshotNow, 0, (ScanKey) NULL);
|
||||
|
||||
while (HeapTupleIsValid(htup = heap_getnext(scan, 0)))
|
||||
{
|
||||
nh++;
|
||||
|
||||
/*
|
||||
@@ -234,8 +233,7 @@ rtbuild(Relation heap,
|
||||
attoff,
|
||||
attnum,
|
||||
finfo,
|
||||
&attnull,
|
||||
buffer);
|
||||
&attnull);
|
||||
nulls[attoff] = (attnull ? 'n' : ' ');
|
||||
}
|
||||
|
||||
@@ -278,8 +276,8 @@ rtbuild(Relation heap,
|
||||
* flushed. We close them to guarantee that they will be.
|
||||
*/
|
||||
|
||||
hrelid = heap->rd_id;
|
||||
irelid = index->rd_id;
|
||||
hrelid = RelationGetRelid(heap);
|
||||
irelid = RelationGetRelid(index);
|
||||
heap_close(heap);
|
||||
index_close(index);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.16 1998/06/15 19:28:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.17 1998/08/19 02:01:21 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -290,10 +290,10 @@ rtadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum)
|
||||
RTScanList l;
|
||||
Oid relid;
|
||||
|
||||
relid = r->rd_id;
|
||||
relid = RelationGetRelid(r);
|
||||
for (l = RTScans; l != (RTScanList) NULL; l = l->rtsl_next)
|
||||
{
|
||||
if (l->rtsl_scan->relation->rd_id == relid)
|
||||
if (RelationGetRelid(l->rtsl_scan->relation) == relid)
|
||||
rtadjone(l->rtsl_scan, op, blkno, offnum);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user