Re: VIEWS

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Markus Feier <mfeier(at)prologon(dot)ch>
Cc: Postgres Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: VIEWS
Date: 2004-09-24 14:27:49
Message-ID: 20040924071923.R39595@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Wed, 22 Sep 2004, Markus Feier wrote:

> Dear Sirs
>
> I encountered a minor Postgres problem using VIEW:
>
> Creating a View like
> CREATE VIEW SELECT * FROM table1
> works perfecly
>
> As soon as we enlarge table1 by new Attributes, they will not show up in the
> VIEV
> The VIEW will need to be deleted and recreated.
>
> This behaviuor may not be considered to be a Bug but it is annoying and
> it conflicts with the assumption, that a VIEW does not execute any
> operation on a Database.

AFAICS, this is what the spec says to do in any case. The view descriptor
for the view at create time includes column descriptors taken from the
query expression.

From SQL92 11.11 <add column definition>
Note: The addition of a column to a table has no effect on any
existing <query expression> included in a view descriptor or
<search condition> included in constraint descriptor because
any implicit <column reference>s in these clauses are replaced
by explicit <column reference>s when the clause is originally
evaluated. See the Syntax Rules of Subclause 7.10, "<query ex-
pression>".

In response to

  • VIEWS at 2004-09-22 09:01:50 from Markus Feier

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2004-09-24 14:36:09 Re: BUG #1266: Improper unique constraint / MVCC
Previous Message Alexey Fedorchenko 2004-09-24 12:46:50 Re: BUG #1266: Improper unique constraint / MVCC activitieswithin single transaction