Search Postgresql Archives

Re: What is the point of create or replace view command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/5/06, Joe Conway wrote:
Chris Velevitch wrote:
> But what about my original question?
>
>     "What is the point of the create or replace view command if you
> can't change the
>     column and data types?"

-- create table t1
create table t1(f int);
-- create view v1 based on table t1
create view v1 as select * from t1;
-- create view v2 based on view v1
create view v2 as select * from v1;
-- attempt to drop and recreate view v1 with a WHERE clause
drop view v1;
-- attempt to create or replace view v1 with a WHERE clause
create or replace view v1 as select * from t1 where 1 = 1;
-- attempt to create or replace view v1 with a different WHERE clause
create or replace view v1 as select * from t1 where 1 = 2;

Sorry, I don't understand what you are trying to say as these examples
don't change the number of columns, type of column or column names. So
according to the description of the command, these will work.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux