diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-20 23:51:44 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-05-20 23:51:44 +0000 |
commit | 44fbe20d620d4f2e39aaa9896de4683e55b0d317 (patch) | |
tree | 5717c7d32f5f7ef72318c70c641129176820a2d0 /src/backend/bootstrap/bootstrap.c | |
parent | c961474c96fd1fedc25896a1de9a98caeedfbe49 (diff) | |
download | postgresql-44fbe20d620d4f2e39aaa9896de4683e55b0d317.tar.gz postgresql-44fbe20d620d4f2e39aaa9896de4683e55b0d317.zip |
Restructure indexscan API (index_beginscan, index_getnext) per
yesterday's proposal to pghackers. Also remove unnecessary parameters
to heap_beginscan, heap_rescan. I modified pg_proc.h to reflect the
new numbers of parameters for the AM interface routines, but did not
force an initdb because nothing actually looks at those fields.
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 1a13786a04d..5f734ff5447 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.129 2002/05/17 01:19:16 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.130 2002/05/20 23:51:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -482,18 +482,18 @@ boot_openrel(char *relname) if (Typ == (struct typmap **) NULL) { rel = heap_openr(TypeRelationName, NoLock); - scan = heap_beginscan(rel, 0, SnapshotNow, 0, (ScanKey) NULL); + scan = heap_beginscan(rel, SnapshotNow, 0, (ScanKey) NULL); i = 0; - while (HeapTupleIsValid(tup = heap_getnext(scan, 0))) + while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL) ++i; heap_endscan(scan); app = Typ = ALLOC(struct typmap *, i + 1); while (i-- > 0) *app++ = ALLOC(struct typmap, 1); *app = (struct typmap *) NULL; - scan = heap_beginscan(rel, 0, SnapshotNow, 0, (ScanKey) NULL); + scan = heap_beginscan(rel, SnapshotNow, 0, (ScanKey) NULL); app = Typ; - while (HeapTupleIsValid(tup = heap_getnext(scan, 0))) + while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL) { (*app)->am_oid = tup->t_data->t_oid; memcpy((char *) &(*app)->am_typ, @@ -858,18 +858,18 @@ gettype(char *type) } elog(DEBUG3, "external type: %s", type); rel = heap_openr(TypeRelationName, NoLock); - scan = heap_beginscan(rel, 0, SnapshotNow, 0, (ScanKey) NULL); + scan = heap_beginscan(rel, SnapshotNow, 0, (ScanKey) NULL); i = 0; - while (HeapTupleIsValid(tup = heap_getnext(scan, 0))) + while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL) ++i; heap_endscan(scan); app = Typ = ALLOC(struct typmap *, i + 1); while (i-- > 0) *app++ = ALLOC(struct typmap, 1); *app = (struct typmap *) NULL; - scan = heap_beginscan(rel, 0, SnapshotNow, 0, (ScanKey) NULL); + scan = heap_beginscan(rel, SnapshotNow, 0, (ScanKey) NULL); app = Typ; - while (HeapTupleIsValid(tup = heap_getnext(scan, 0))) + while ((tup = heap_getnext(scan, ForwardScanDirection)) != NULL) { (*app)->am_oid = tup->t_data->t_oid; memmove((char *) &(*app++)->am_typ, |