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

From Alvaro Herrera
Subject Re: patch: Add columns via CREATE OR REPLACE VIEW
Date
Msg-id 20080807180139.GK4171@alvh.no-ip.org
Whole thread Raw
In response to Re: patch: Add columns via CREATE OR REPLACE VIEW  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: patch: Add columns via CREATE OR REPLACE VIEW  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Andrew Dunstan escribió:
>
>
> Tom Lane wrote:
>> Maybe the right way is to *not* use CREATE OR REPLACE VIEW, but
>> rather ALTER VIEW ADD COLUMN and so on.  Then column identity seems
>> a lot easier to keep track of.
>
> How would that look? Where would we put the new query?

I was thinking that the ADD COLUMN should specify the new result list
entry.  Of course, this doesn't allow changing the query in more complex
ways (e.g. you can't add a GROUP BY clause that wasn't already there).

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

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