aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/command.c
diff options
context:
space:
mode:
authorHiroshi Inoue <inoue@tpf.co.jp>2000-11-14 01:57:30 +0000
committerHiroshi Inoue <inoue@tpf.co.jp>2000-11-14 01:57:30 +0000
commit3eaf3363d7f43d1743780494b679aa2fa7aa65ea (patch)
tree347bc11634e1bbae09af21581861d3b4df720984 /src/backend/commands/command.c
parent8f3b2b3a5c902640ae33648637fa624405f376d2 (diff)
downloadpostgresql-3eaf3363d7f43d1743780494b679aa2fa7aa65ea.tar.gz
postgresql-3eaf3363d7f43d1743780494b679aa2fa7aa65ea.zip
Fix illegal combination of SearchSysCacheTuple() and heap_freetuple()
in AlterTableOwner().
Diffstat (limited to 'src/backend/commands/command.c')
-rw-r--r--src/backend/commands/command.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c
index 073360c1e4a..958469fa4e1 100644
--- a/src/backend/commands/command.c
+++ b/src/backend/commands/command.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.110 2000/11/12 00:36:56 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.111 2000/11/14 01:57:30 inoue Exp $
*
* NOTES
* The PerformAddAttribute() code, like most of the relation
@@ -1447,14 +1447,13 @@ AlterTableOwner(const char *relationName, const char *newOwnerName)
elog(ERROR, "ALTER TABLE: user \"%s\" not found", newOwnerName);
newOwnerSysid = ((Form_pg_shadow) GETSTRUCT(tuple))->usesysid;
- heap_freetuple(tuple);
/*
* find the table's entry in pg_class and lock it for writing
*/
class_rel = heap_openr(RelationRelationName, RowExclusiveLock);
- tuple = SearchSysCacheTuple(RELNAME, PointerGetDatum(relationName),
+ tuple = SearchSysCacheTupleCopy(RELNAME, PointerGetDatum(relationName),
0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "ALTER TABLE: relation \"%s\" not found",