Re: questions on ALTER TABLE ... OWNER

From: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: questions on ALTER TABLE ... OWNER
Date: 2002-02-19 19:24:59
Message-ID: 20020219192459.GA24738@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 19, 2002 at 02:03:38PM -0500, Tom Lane wrote:
> nconway(at)klamath(dot)dyndns(dot)org (Neil Conway) writes:
> > Currently, ALTER TABLE ... OWNER will change the ownership of a table,
> > view, sequence or index -- despite the fact that its name hints that it
> > is only for 'altering tables'.
>
> > 1) Is this behavior optimal? There is clearly a need to change the
> > ownership of relations other than tables, but it seems to me that
> > pushing this functionality into ALTER TABLE is unintuitive.
>
> > On the other hand, creating ALTER INDEX ... OWNER, ALTER SEQUENCE ...
> > OWNER, etc. seems like overkill.
>
> Definitely overkill.

You're probably right -- although there is a symmetry between 'create
sequence', 'alter sequence', and 'drop sequence', rather than 'create
sequence', 'alter table' and 'drop sequence'.

BTW, the same semantic problems also apply to ALTER TABLE ... rename.

> I'd say tweak the docs and leave the code alone.

Okay, fixed. I also corrected another minor inaccuracy in the ALTER
TABLE docs.

Bruce/Tom: Please apply for 7.2.1 and 7.3.

Cheers,

Neil

--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC

Attachment Content-Type Size
alter_table_docs.patch text/plain 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2002-02-19 20:39:18 Re: questions on ALTER TABLE ... OWNER
Previous Message Tom Lane 2002-02-19 19:03:38 Re: questions on ALTER TABLE ... OWNER