From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, 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 20:24:18 |
Message-ID: | 4B87C131-A0C3-4716-BAF7-FA0649E9A719@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Aug 7, 2008, at 13:01, Tom Lane wrote:
>> +1, although what does the standard say?
>
> AFAICT the standard doesn't have any way to alter the definition of an
> existing view at all. It might be worth asking what other systems do,
> though --- can you alter a view in Oracle or DB2 or mysql?
Looks like MySQL 6.0 just does a CREATE OR REPLACE when you do ALTER
VIEW:
http://dev.mysql.com/doc/refman/6.0/en/create-view.html
http://dev.mysql.com/doc/refman/6.0/en/alter-view.html
Oracle doesn't seem to do much with it, either, just recompiles a view:
http://download.oracle.com/docs/cd/B10500_01/server.920/a96540/statements_45a.htm
Note that it says, "This statement does not change the definition of
an existing view. To redefine a view, you must use CREATE VIEW with
the OR REPLACE keywords."
DB2's ALTER VIEW is a bit more promising, though there doesn't seem to
be a way to add columns, just to redefine them:
Best,
David
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2008-08-07 20:46:30 | Re: patch: Add columns via CREATE OR REPLACE VIEW |
Previous Message | Tom Lane | 2008-08-07 20:01:33 | Re: patch: Add columns via CREATE OR REPLACE VIEW |