mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +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:
5
src/backend/utils/cache/relcache.c
vendored
5
src/backend/utils/cache/relcache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.227 2005/08/12 01:35:59 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.228 2005/08/26 03:07:48 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -39,6 +39,7 @@
|
||||
#include "catalog/pg_amproc.h"
|
||||
#include "catalog/pg_attrdef.h"
|
||||
#include "catalog/pg_attribute.h"
|
||||
#include "catalog/pg_authid.h"
|
||||
#include "catalog/pg_constraint.h"
|
||||
#include "catalog/pg_index.h"
|
||||
#include "catalog/pg_namespace.h"
|
||||
@ -2074,6 +2075,8 @@ RelationBuildLocalRelation(const char *relname,
|
||||
rel->rd_rel->relhasoids = rel->rd_att->tdhasoid;
|
||||
rel->rd_rel->relnatts = natts;
|
||||
rel->rd_rel->reltype = InvalidOid;
|
||||
/* needed when bootstrapping: */
|
||||
rel->rd_rel->relowner = BOOTSTRAP_SUPERUSERID;
|
||||
|
||||
/*
|
||||
* Insert relation physical and logical identifiers (OIDs) into the
|
||||
|
Reference in New Issue
Block a user