Re: POSS. FEATURE REQ: "Dynamic" Views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: CSN <cool_screen_name90001(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: POSS. FEATURE REQ: "Dynamic" Views
Date: 2005-08-26 03:54:26
Message-ID: 5060.1125028466@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jim C. Nasby" <jnasby(at)pervasive(dot)com> writes:
> ... since currently CREATE VIEW v AS SELECT * FROM t
> actually expands the * out at creation time.

I believe that that behavior is required by the SQL spec. For instance,
SQL92's description of ALTER TABLE ADD COLUMN sez:

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>".

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2005-08-26 04:12:05 Re: POSS. FEATURE REQ: "Dynamic" Views
Previous Message Tony Caduto 2005-08-26 03:08:45 Re: Its Beta Time Again ... 8.1 Beta 1 Now Available