diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-08-19 02:04:17 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-08-19 02:04:17 +0000 |
commit | 7971539020a344dce3a8b3b9b93ff4f10e2f823a (patch) | |
tree | 8dca0af0d3ac8d431bff8c0dec793fe9733a1ee9 /src/backend/commands/dbcommands.c | |
parent | 31de2c9461dff3284ad61084c73eba093fa3f68e (diff) | |
download | postgresql-7971539020a344dce3a8b3b9b93ff4f10e2f823a.tar.gz postgresql-7971539020a344dce3a8b3b9b93ff4f10e2f823a.zip |
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;
Diffstat (limited to 'src/backend/commands/dbcommands.c')
-rw-r--r-- | src/backend/commands/dbcommands.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index d202388c685..a0438129dff 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; |