Re: [gnome-db] Triggers support



Le Lundi 16 Décembre 2002 09:52, Vivien Malerba a écrit :
> If you are talking about a schema for triggers (I haven't followed the
> whole discussion so forgive me if I'm out of subject), can you also
> think about how to get information on foreign keys and referential
> integrity rules?

In PostgreSQL, both triggers and foreign keys are implemented ***internaly*** 
using rules. But, for data integrity questions, it is not recommanded to 
alter PostgreSQL schema ***externaly*** using the rule system.

Basically, the difference between a rule and a trigger is that a rule is able 
to re-write an SQL query before it is executed in order to alter its syntax. 
In other words, a rules is able to modify the syntax and execute actions, 
whereas a trigger can only execute actions. A trigger is a subset of a rule.

http://www.postgresql.org/idocs/index.php?sql-createrule.html

> I know that within Postgres these two notions are implemented using
> triggers, but I don't know if it is the same for other DBMS. Maybe it is
> easier to have a schema request for triggers and another for foreign
> keys and referential integrity rules, may be not...

http://www.freebsddiary.org/postgresql-dropping-constraints.php describes some 
illegal schema access in 7.2. But the information for > 7.3 is interesting.

PostgreSQL rules, triggers and foreign keys should be considered different 
objects in libgda.

Cheers,
Jean-Michel



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]