Re: patch: Add columns via CREATE OR REPLACE VIEW - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: patch: Add columns via CREATE OR REPLACE VIEW
Date
Msg-id 871w10tzoq.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: patch: Add columns via CREATE OR REPLACE VIEW  ("Robert Haas" <robertmhaas@gmail.com>)
Responses Re: patch: Add columns via CREATE OR REPLACE VIEW  ("Robert Haas" <robertmhaas@gmail.com>)
List pgsql-hackers
"Robert Haas" <robertmhaas@gmail.com> writes:

> I think the only thing we need to agree on is that no future implementation
> of CREATE OR REPLACE VIEW will ever implicitly rename a column. If we agree
> on column name as a measure of column identity, then the change I'm
> proposing is forward-compatible with any other enhancements we may want to
> make later.

hm... so what would this output?

CREATE VIEW a AS (select 1 as a, 2 as b);
CREATE VIEW b AS (select x,y FROM a AS a(x,y))
CREATE OR REPLACE VIEW a AS (select 1 as b, 'two' as c, 3 as a);
SELECT * FROM b;

What about this?

CREATE OR REPLACE VIEW a AS (select 1 as b, 2 as c, 'three as a);
SELECT * FROM b;

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about
EnterpriseDB'sPostgreSQL training!
 


pgsql-hackers by date:

Previous
From: "Robert Haas"
Date:
Subject: Re: patch: Add columns via CREATE OR REPLACE VIEW
Next
From: "Pavel Stehule"
Date:
Subject: Re: patch: Add columns via CREATE OR REPLACE VIEW