From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: patch: Add columns via CREATE OR REPLACE VIEW |
Date: | 2008-08-07 18:13:17 |
Message-ID: | 22019.1218132797@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> 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.
Yeah, that's what I was thinking too. If you needed to change more
than just the topmost SELECT list, you'd need two steps: an ADD COLUMN
and then CREATE OR REPLACE VIEW to change the query in some way that
doesn't result in changing the output column set. Maybe that's going
to be too awkward to use though.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2008-08-07 18:34:32 | Re: patch: Add columns via CREATE OR REPLACE VIEW |
Previous Message | Alvaro Herrera | 2008-08-07 18:01:39 | Re: patch: Add columns via CREATE OR REPLACE VIEW |