From 7971539020a344dce3a8b3b9b93ff4f10e2f823a Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 19 Aug 1998 02:04:17 +0000 Subject: heap_fetch requires buffer pointer, must be released; heap_getnext no longer returns buffer pointer, can be gotten from scan; descriptor; bootstrap can create multi-key indexes; pg_procname index now is multi-key index; oidint2, oidint4, oidname are gone (must be removed from regression tests); use System Cache rather than sequential scan in many places; heap_modifytuple no longer takes buffer parameter; remove unused buffer parameter in a few other functions; oid8 is not index-able; remove some use of single-character variable names; cleanup Buffer variables usage and scan descriptor looping; cleaned up allocation and freeing of tuples; 18k lines of diff; --- src/backend/commands/dbcommands.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/backend/commands/dbcommands.c') diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index d202388c68..a0438129df 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.19 1998/08/11 18:28:13 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.20 1998/08/19 02:01:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -148,7 +148,6 @@ get_pg_dbtup(char *command, char *dbname, Relation dbrel) { HeapTuple dbtup; HeapTuple tup; - Buffer buf; HeapScanDesc scan; ScanKeyData scanKey; @@ -163,13 +162,10 @@ get_pg_dbtup(char *command, char *dbname, Relation dbrel) * since we want to return the tuple out of this proc, and we're going * to close the relation, copy the tuple and return the copy. */ - tup = heap_getnext(scan, 0, &buf); + tup = heap_getnext(scan, 0); if (HeapTupleIsValid(tup)) - { dbtup = heap_copytuple(tup); - ReleaseBuffer(buf); - } else dbtup = tup; @@ -205,8 +201,9 @@ check_permissions(char *command, char path[MAXPGPATH + 1]; userName = GetPgUserName(); - utup = SearchSysCacheTuple(USENAME, PointerGetDatum(userName), - 0, 0, 0); + utup = SearchSysCacheTuple(USENAME, + PointerGetDatum(userName), + 0, 0, 0); *userIdP = ((Form_pg_shadow) GETSTRUCT(utup))->usesysid; use_super = ((Form_pg_shadow) GETSTRUCT(utup))->usesuper; use_createdb = ((Form_pg_shadow) GETSTRUCT(utup))->usecreatedb; -- cgit v1.2.1