Skip site navigation (1) Skip section navigation (2)

Re: rename of a view

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Euler Taveira de Oliveira <euler(at)timbira(dot)com>, David Fetter <david(at)fetter(dot)org>, Susanne Ebrecht <miracee(at)miracee(dot)de>, pgsql-docs(at)postgresql(dot)org
Subject: Re: rename of a view
Date: 2007-06-30 05:43:41
Message-ID: 1183182221.20942.8.camel@goldbach (view raw or flat)
Thread:
Lists: pgsql-docspgsql-patches
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



In response to

Responses

pgsql-docs by date

Next:From: Tom LaneDate: 2007-06-30 05:48:51
Subject: Re: rename of a view
Previous:From: David FetterDate: 2007-06-30 05:40:44
Subject: Re: rename of a view

pgsql-patches by date

Next:From: Tom LaneDate: 2007-06-30 05:48:51
Subject: Re: rename of a view
Previous:From: David FetterDate: 2007-06-30 05:40:44
Subject: Re: rename of a view

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group