summaryrefslogtreecommitdiff
path: root/contrib/miscutil/misc_utils.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/miscutil/misc_utils.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/miscutil/misc_utils.c')
-rw-r--r--contrib/miscutil/misc_utils.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/contrib/miscutil/misc_utils.c b/contrib/miscutil/misc_utils.c
index d3133929657..26bbabe46f7 100644
--- a/contrib/miscutil/misc_utils.c
+++ b/contrib/miscutil/misc_utils.c
@@ -93,12 +93,12 @@ active_listeners(text *relname)
Anum_pg_listener_relname,
F_NAMEEQ,
PointerGetDatum(listen_name));
- sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, &key);
+ sRel = heap_beginscan(lRel, SnapshotNow, 1, &key);
}
else
- sRel = heap_beginscan(lRel, 0, SnapshotNow, 0, (ScanKey) NULL);
+ sRel = heap_beginscan(lRel, SnapshotNow, 0, (ScanKey) NULL);
- while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0)))
+ while ((lTuple = heap_getnext(sRel, ForwardScanDirection)) != NULL)
{
d = heap_getattr(lTuple, Anum_pg_listener_pid, tdesc, &isnull);
pid = DatumGetInt32(d);
@@ -111,14 +111,3 @@ active_listeners(text *relname)
return count;
}
-
-
-/* end of file */
-
-/*
- * Local Variables:
- * tab-width: 4
- * c-indent-level: 4
- * c-basic-offset: 4
- * End:
- */