aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.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 /src/backend/commands/dbcommands.c
parentc961474c96fd1fedc25896a1de9a98caeedfbe49 (diff)
downloadpostgresql-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/commands/dbcommands.c')
-rw-r--r--src/backend/commands/dbcommands.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index bb53ad8b3bb..d4bc274ba29 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.89 2002/05/17 01:19:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.90 2002/05/20 23:51:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -387,9 +387,9 @@ dropdb(const char *dbname)
ScanKeyEntryInitialize(&key, 0, ObjectIdAttributeNumber,
F_OIDEQ, ObjectIdGetDatum(db_id));
- pgdbscan = heap_beginscan(pgdbrel, 0, SnapshotNow, 1, &key);
+ pgdbscan = heap_beginscan(pgdbrel, SnapshotNow, 1, &key);
- tup = heap_getnext(pgdbscan, 0);
+ tup = heap_getnext(pgdbscan, ForwardScanDirection);
if (!HeapTupleIsValid(tup))
{
/*
@@ -463,8 +463,8 @@ AlterDatabaseSet(AlterDatabaseSetStmt *stmt)
rel = heap_openr(DatabaseRelationName, RowExclusiveLock);
ScanKeyEntryInitialize(&scankey, 0, Anum_pg_database_datname,
F_NAMEEQ, NameGetDatum(stmt->dbname));
- scan = heap_beginscan(rel, 0, SnapshotNow, 1, &scankey);
- tuple = heap_getnext(scan, 0);
+ scan = heap_beginscan(rel, SnapshotNow, 1, &scankey);
+ tuple = heap_getnext(scan, ForwardScanDirection);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "database \"%s\" does not exist", stmt->dbname);
@@ -535,9 +535,9 @@ get_db_info(const char *name, Oid *dbIdP, int4 *ownerIdP,
ScanKeyEntryInitialize(&scanKey, 0, Anum_pg_database_datname,
F_NAMEEQ, NameGetDatum(name));
- scan = heap_beginscan(relation, 0, SnapshotNow, 1, &scanKey);
+ scan = heap_beginscan(relation, SnapshotNow, 1, &scanKey);
- tuple = heap_getnext(scan, 0);
+ tuple = heap_getnext(scan, ForwardScanDirection);
gottuple = HeapTupleIsValid(tuple);
if (gottuple)