1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-07 19:06:32 +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/catalog/index.c,v 1.259 2005/08/12 01:35:56 tgl Exp $
* $PostgreSQL: pgsql/src/backend/catalog/index.c,v 1.260 2005/08/26 03:07:12 tgl Exp $
*
*
* INTERFACE ROUTINES
@@ -562,7 +562,7 @@ index_create(Oid heapRelationId,
*
* XXX should have a cleaner way to create cataloged indexes
*/
indexRelation->rd_rel->relowner = GetUserId();
indexRelation->rd_rel->relowner = heapRelation->rd_rel->relowner;
indexRelation->rd_rel->relam = accessMethodObjectId;
indexRelation->rd_rel->relkind = RELKIND_INDEX;
indexRelation->rd_rel->relhasoids = false;