Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3
Дата
Msg-id 20020124165813.GC15695@rice.edu
обсуждение исходный текст
Ответ на Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3  (Jean-Michel POURE <jm.poure@freesurf.fr>)
Ответы Re: Add OR REPLACE clauses to non-FUNCTION object creation in PostgreSQL 7.3
Список pgsql-hackers
On Thu, Jan 24, 2002 at 05:21:14PM +0100, Jean-Michel POURE wrote:
> 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...

Just a nomenclature/language thing: a trigger on a view won't do very
much, and I think can not be created in 7.2. A trigger fires when
tuples are about to be stored or accessed from storage: since a view
_has_ no storage of it's own (well, none that's used) a trigger will
never fire.  Rules, on the other hand, rewrite the SQL: that's how views
are implemented.  So, you mean ' VIEWs with additional rules'.

Ross


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

Предыдущее
От: Michael Devogelaere
Дата:
Сообщение: Re: PostgreSQL crashes with Qmail-SQL
Следующее
От: "Mitch Vincent"
Дата:
Сообщение: Re: PostgreSQL crashes with Qmail-SQL