From: | snpe <snpe(at)snpe(dot)co(dot)yu> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | Bruno Wolff III <bruno(at)wolff(dot)to>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: create or replace view |
Date: | 2002-11-14 16:49:42 |
Message-ID: | 200211141649.42037.snpe@snpe.co.yu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thursday 14 November 2002 04:38 pm, Rod Taylor wrote:
> On Thu, 2002-11-14 at 11:17, snpe wrote:
> > On Thursday 14 November 2002 02:41 pm, Bruno Wolff III wrote:
> > > On Thu, Nov 14, 2002 at 13:41:18 +0000,
> > >
> > > snpe <snpe(at)snpe(dot)co(dot)yu> wrote:
> > > > Hello,
> > > > When I change view and change number of column PostgreSQL return
> > > > error
> > > >
> > > > : 'cannot change number of column in view'
> > > >
> > > > Is it too hard set this command
> > > > if view exits drop view
> > > > and then change view
> > > >
> > > > It is like with return type in function
> > > >
> > > > Now 'or replace' don't help too much
> > >
> > > The create or replace command exists so that you can modify a view in a
> > > way that allows other objects that refer to it to keep working (without
> > > having to recreate those objects). However if you can the number of
> > > columns (and probably any of their types), then these other objects
> > > or going to need to know that things have changed so that you can't
> > > just replace the view.
> >
> > I undestand that, but if I change number of column I want that
> > 'create or replace view' do 'drop view ..; create view ..;'
> > Why not ?
>
> Now you've just broken all functions, views, rules, and triggers that
> depend on that view to function.
But I can simple:
drop view view_name;
create view view_name ...;
I want that 'create or replace view' work drop-create if view exists else only
create
regards
Haris Peco
From | Date | Subject | |
---|---|---|---|
Next Message | snpe | 2002-11-14 17:00:30 | Re: create or replace view |
Previous Message | Rod Taylor | 2002-11-14 16:38:59 | Re: create or replace view |