Re: ALTER TABLE OWNER: change indexes - Mailing list pgsql-patches

From Tom Lane
Subject Re: ALTER TABLE OWNER: change indexes
Date
Msg-id 13392.1014593587@sss.pgh.pa.us
Whole thread Raw
In response to Re: ALTER TABLE OWNER: change indexes  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Peter Eisentraut <peter_e@gmx.net> writes:
> Maybe indexes and TOAST tables shouldn't have ownership it all.  (Set
> relowner to 0.)  Since only owners can create these things, there doesn't
> seem to be a point in maintaining ownership.

That's a good thought.  At one time we allowed non-owners to create
indexes on tables, but it was correctly pointed out that this was a
bad idea (think UNIQUE index, or a functional index that always
causes an error...).  I can't see a real good reason for either indexes
or TOAST tables to have a concept of ownership distinct from the parent
table.

psql's \d displays might have some trouble with this, and pg_dump might
get confused too.  But fixing them would be a net improvement in
robustness so it's probably a reasonable thing to do.

            regards, tom lane

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: ALTER TABLE OWNER: change indexes
Next
From: "Rod Taylor"
Date:
Subject: Basic DOMAIN Support