1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

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.
This commit is contained in:
Tom Lane
2005-08-26 03:08:15 +00:00
parent 09a6c90945
commit f26b91761b
8 changed files with 25 additions and 11 deletions

View File

@ -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,