summaryrefslogtreecommitdiff
path: root/contrib/dbsize/dbsize.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-05-20 23:51:44 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-05-20 23:51:44 +0000
commit44fbe20d620d4f2e39aaa9896de4683e55b0d317 (patch)
tree5717c7d32f5f7ef72318c70c641129176820a2d0 /contrib/dbsize/dbsize.c
parentc961474c96fd1fedc25896a1de9a98caeedfbe49 (diff)
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 'contrib/dbsize/dbsize.c')
-rw-r--r--contrib/dbsize/dbsize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/dbsize/dbsize.c b/contrib/dbsize/dbsize.c
index d85822914df..b072a86912f 100644
--- a/contrib/dbsize/dbsize.c
+++ b/contrib/dbsize/dbsize.c
@@ -59,8 +59,8 @@ database_size(PG_FUNCTION_ARGS)
relation = heap_openr(DatabaseRelationName, AccessShareLock);
ScanKeyEntryInitialize(&scanKey, 0, Anum_pg_database_datname,
F_NAMEEQ, NameGetDatum(dbname));
- scan = heap_beginscan(relation, 0, SnapshotNow, 1, &scanKey);
- tuple = heap_getnext(scan, 0);
+ scan = heap_beginscan(relation, SnapshotNow, 1, &scanKey);
+ tuple = heap_getnext(scan, ForwardScanDirection);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "database %s does not exist", NameStr(*dbname));