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
Дата
Msg-id 200201241621.g0OGLEL26782@www1.translationforge
обсуждение исходный текст
Ответ на Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3  ("Kaare Rasmussen" <kar@kakidata.dk>)
Ответы Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3
Список 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


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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Add OR REPLACE clauses to non-FUNCTION object creat
Следующее
От: Don Baccus
Дата:
Сообщение: Re: PostgreSQL crashes with Qmail-SQL