Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3 - Mailing list pgsql-hackers

From Jean-Michel POURE
Subject Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3
Date
Msg-id 200201241559.g0OFxML26596@www1.translationforge
Whole thread Raw
In response to Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3  ("Kaare Rasmussen" <kar@kakidata.dk>)
List pgsql-hackers
> 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.

i.e. if the view definition is not correct, you loose your work.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.1.4
Next
From: Dave Page
Date:
Subject: Re: Add OR REPLACE clauses to non-FUNCTION object creat