Re: Commit rules or Commit trigger

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Vivek Khera <vivek(at)khera(dot)org>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Commit rules or Commit trigger
Date: 2006-04-27 19:54:40
Message-ID: 20060427195440.GB990@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 27, 2006 at 10:17:51 -0400,
Vivek Khera <vivek(at)khera(dot)org> wrote:
>
> On Apr 24, 2006, at 9:37 AM, Claudio Tognolo wrote:
>
> >I am developing a temporal database and I have the necessity to
> >control the integrity constraints befor the commit of the transiction.
> >I cannot use the deferrable checking because the integrity
> >constraints is a select and i cannot use the trigger or rule because
> >the event parameter not support the commit event.
> >You have some idea?
>
> My understanding is that deferred constraints are not checked until
> commit time, which seems to be what you want. Why do you believe
> otherwise?

But you aren't really allowed to do selects in constraints even though you
can make Postgres do that in a way that partly works. You need to enforce
these constraints with an after trigger.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Davies 2006-04-27 20:00:32 trying to write a many-to-many type function.
Previous Message Strobhen 2006-04-27 19:03:50 Unexpected behavior