Re: TODO list comments

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Matt Miller <mattm(at)epx(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO list comments
Date: 2005-08-25 22:43:35
Message-ID: 8B68D09B-8824-4A6A-9732-BD776E130224@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2005-08-25 22:46:27 Re: Stuff running slooow
Previous Message Tom Lane 2005-08-25 22:15:46 Re: [HACKERS] Proposed patch to getaddrinfo.c to support