Re: Add OR REPLACE clauses to non-FUNCTION object creat

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Add OR REPLACE clauses to non-FUNCTION object creat
Дата
Msg-id FED2B709E3270E4B903EB0175A49BCB10B52A5@dogbert.vale-housing.co.uk
обсуждение исходный текст
Список pgsql-hackers

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr] 
> Sent: 24 January 2002 15:59
> To: Kaare Rasmussen
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] Add OR REPLACE clauses to non-FUNCTION 
> object creation in PostgreSQL 7.3
> 
> 
> > Isn't it the same as
> >
> > DROP VIEW name
> > CREATE VIEW name
> > or
> > DROP TRIGGER name
> > CREATE TRIGGER name
> 
> Two examples :
> 1) Views with triggers
> If you drop a view which has triggers and then re-recreate 
> the view, the 
> triggers are lost.
> 
> 2) Server side code consistency
> Let's say you are working on a large view in pgAdmin II. If 
> you drop a view 
> and recreate it, you can never be sure that the new version 
> of the view will 
> ba accepted by PostgeSQL.

No strictly true 'cos if PostgreSQL throws an error, that trickles through
the pgSchema hierarchy back to pgAdmin which will *not* close the window you
have open, but will return you to the point you were at  immediately before
you hit OK.

But there other other Bad Things (tm) that might happen - especially if
you're working on a live production database (tut tut :-) ).

Regards, Dave.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jean-Michel POURE
Дата:
Сообщение: Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3
Следующее
От: Jean-Michel POURE
Дата:
Сообщение: Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3