On Aug 25, 2005, at 11:29 PM, Matt Miller wrote:
On Thu, 2005-08-25 at 15:50 +0900, Michael Glaesemann wrote:
* %Remove CREATE CONSTRAINT TRIGGER
Do we really want to remove it,
Also, I believe CONSTRAINT TRIGGERS are the only way to provide
transaction level (rather than statement level) referential
integrity.
Don't deferrable foreign keys give you transaction-level referential
integrity? From the SET CONSTRAINTS doc:
Sorry, I misspoke. What I'm thinking of is not referential integrity
in the sense of foreign keys, but assertions, which PostgreSQL does
not yet support.
Say for example you have a table that contains time periods marked by
a start_date and an end_date and you want there to be no gaps between
the different time periods in the table for a given key. When doing
updates, deletes, or inserts on this table, you'll need to check to
make sure there are no gaps when the transaction is finished.
However, there may indeed be gaps during the transaction as
start_dates and end_dates are updated. Triggers can be written to
enforce this kind of integrity, but they'll only work if they're
deferrable.
Michael Glaesemann
grzm myrealbox com
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster