From 44fbe20d620d4f2e39aaa9896de4683e55b0d317 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 20 May 2002 23:51:44 +0000 Subject: 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. --- contrib/miscutil/misc_utils.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'contrib/miscutil') 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: - */ -- cgit v1.2.3