Re: Add OR REPLACE clauses to non-FUNCTION object creat - Mailing list pgsql-hackers

From Dave Page
Subject Re: Add OR REPLACE clauses to non-FUNCTION object creat
Date
Msg-id FED2B709E3270E4B903EB0175A49BCB10B52A5@dogbert.vale-housing.co.uk
Whole thread Raw
List 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 by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3
Next
From: Jean-Michel POURE
Date:
Subject: Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3