diff options
| author | Tom Lane | 2005-08-04 01:09:29 +0000 |
|---|---|---|
| committer | Tom Lane | 2005-08-04 01:09:29 +0000 |
| commit | 33f5bf97009811d7f6b5408e37c6ad68110985b0 (patch) | |
| tree | af599eafaa4b01a044de0e8e98f5eb16bbcd19aa /src/include/commands | |
| parent | e48b28b688c9dd1ad2d74fcfeed7d76fe63d0047 (diff) | |
ALTER TABLE OWNER must change the ownership of the table's rowtype too.
This was not especially critical before, but it is now that we track
ownership dependencies --- the dependency for the rowtype *must* shift
to the new owner. Spotted by Bernd Helmle.
Also fix a problem introduced by recent change to allow non-superusers
to do ALTER OWNER in some cases: if the table had a toast table, ALTER
OWNER failed *even for superusers*, because the test being applied would
conclude that the new would-be owner had no create rights on pg_toast.
A side-effect of the fix is to disallow changing the ownership of indexes
or toast tables separately from their parent table, which seems a good
idea on the whole.
Diffstat (limited to 'src/include/commands')
| -rw-r--r-- | src/include/commands/typecmds.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h index a070a27a292..d53cf672a65 100644 --- a/src/include/commands/typecmds.h +++ b/src/include/commands/typecmds.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/commands/typecmds.h,v 1.12 2005/08/01 04:03:58 tgl Exp $ + * $PostgreSQL: pgsql/src/include/commands/typecmds.h,v 1.13 2005/08/04 01:09:29 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -35,6 +35,7 @@ extern void AlterDomainDropConstraint(List *names, const char *constrName, extern List *GetDomainConstraints(Oid typeOid); extern void AlterTypeOwner(List *names, Oid newOwnerId); +extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId); extern void AlterTypeNamespace(List *names, const char *newschema); extern void AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid, bool errorOnTableType); |
