diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-26 03:08:15 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-08-26 03:08:15 +0000 |
commit | f26b91761bd25f9da2f97d818f60ae68588888c2 (patch) | |
tree | 54af9e5352ecbc5627914a58fd19744e41fb8e06 /src/backend/commands/tablecmds.c | |
parent | 09a6c909458b44c51d0c8a8b58ae2590c7815b9f (diff) | |
download | postgresql-f26b91761bd25f9da2f97d818f60ae68588888c2.tar.gz postgresql-f26b91761bd25f9da2f97d818f60ae68588888c2.zip |
Arrange for indexes and toast tables to inherit their ownership from
the parent table, even if the command that creates them is executed by
someone else (such as a superuser or a member of the owning role).
Per gripe from Michael Fuhr.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 91f5eaecd95..7bf1d297a7a 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.169 2005/08/23 22:40:07 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.170 2005/08/26 03:07:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -427,6 +427,7 @@ DefineRelation(CreateStmt *stmt, char relkind) namespaceId, tablespaceId, InvalidOid, + GetUserId(), descriptor, relkind, false, @@ -5946,6 +5947,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent) PG_TOAST_NAMESPACE, rel->rd_rel->reltablespace, InvalidOid, + rel->rd_rel->relowner, tupdesc, RELKIND_TOASTVALUE, shared_relation, |