Re: POSS. FEATURE REQ: "Dynamic" Views - Mailing list pgsql-general

From Tom Lane
Subject Re: POSS. FEATURE REQ: "Dynamic" Views
Date
Msg-id 5060.1125028466@sss.pgh.pa.us
Whole thread Raw
In response to Re: POSS. FEATURE REQ: "Dynamic" Views  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-general
"Jim C. Nasby" <jnasby@pervasive.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

pgsql-general by date:

Previous
From: Ian Harding
Date:
Subject: Re: POSS. FEATURE REQ: "Dynamic" Views
Next
From: felix@crowfix.com
Date:
Subject: Re: unsubscribe