Re: rename of a view - Mailing list pgsql-docs

From Neil Conway
Subject Re: rename of a view
Date
Msg-id 1183182221.20942.8.camel@goldbach
Whole thread Raw
In response to Re: rename of a view  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: rename of a view  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
On Sat, 2007-30-06 at 01:36 -0400, Tom Lane wrote:
> No objection to that; it'd square with our treatment of TYPE and DOMAIN
> commands.  What I'm wondering though is whether the whole patch has
> a reason to live at all, as compared to documenting someplace more
> prominent than now that ALTER TABLE works on views & sequences.

Using ALTER TABLE to rename views and sequences is quite counter-
intuitive, and has been a repeated source of confusion for users. Sure,
we can document that behavior more prominently, but it seems to me it
would be more straightforward in the long-run to just make the system
behave more intuitively in the first place. As an added bonus, it takes
very little new code to implement.

For the ALTER SEQUENCE case, I think it's also a little weird to have an
ALTER SEQUENCE command that modifies some of the properties of a
sequence, but not the sequence's name. While that argument doesn't apply
to ALTER VIEW at the moment, recent history suggests that it may only be
a matter of time before we need to add an ALTER VIEW command anyway...
(for instance, to control the properties of materialized or updateable
views).

-Neil



pgsql-docs by date:

Previous
From: David Fetter
Date:
Subject: Re: rename of a view
Next
From: Tom Lane
Date:
Subject: Re: rename of a view