From: | Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr> |
---|---|
To: | "Kaare Rasmussen" <kar(at)kakidata(dot)dk> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3 |
Date: | 2002-01-24 16:21:14 |
Message-ID: | 200201241621.g0OGLEL26782@www1.translationforge |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Le Mercredi 23 Janvier 2002 15:09, Kaare Rasmussen a écrit :
> Isn't it the same as
> DROP VIEW name
> CREATE VIEW name
> DROP TRIGGER name
> CREATE TRIGGER name
No, CREATE OR REPLACE keeps oids, which is much more interesting.
A few examples :
1) Views with triggers.
Triggers can be used to update views. But in the case of a simple
DROP/CREATE, after dropping the view, the triggers are lost (depency problem).
IFirthermore, if we had CREATE OR REPLACE, we could have pgAdmin II create
the underlying triggers automatically to update views...
2) Server side code consistency
IMHO, it is not possible to DROP / CREATE a view in a single transaction.
Therefore, if you drop a view and the definition of the new view is
incorrect, you loose the view. You can always save the old view definition,
but this is not serious programming...
3) Future database IDE will be built upon abstraction layers (PEAR DB,
MetatData, GnomeDB) to enable easy migration from one database to another
(and make PostgreSQL world champion which is our goal). Abstraction layers
will not take into account things like DROP/CREATE.
In more general aspects :
At pgAdmin II, we would like to bundle pgAdmin with a Windows PostgreSQL
installer wizard. And upload the package to free downloading sites. We need
these features to say : "Look, PostgreSQL is the new AccessXP competitor" or
whatever. This will bring a new audience to PostgreSQL.
Best regards,
Jean-Michel POURE
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2002-01-24 16:22:45 | Re: Add OR REPLACE clauses to non-FUNCTION object creat |
Previous Message | Don Baccus | 2002-01-24 16:12:54 | Re: PostgreSQL crashes with Qmail-SQL |