Skip site navigation (1) Skip section navigation (2)

Re: deferrable triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: deferrable triggers
Date: 2011-12-20 21:08:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> In a discussion on irc today, someone had a need to confirm that a
> business rule (this table has two rows for every related one row in
> another table) was true at commit time.  I innocently suggested a
> deferrable (and deferred) trigger.  It was pointed out that the
> docs:
> say:
> | This can only be specified for constraint triggers.
> Hmm.  Somehow I had gotten hold of deferrable triggers as a way to
> solve a problem in moving our replication from our Java framework to
> PostgreSQL triggers.  So we are using a hand-written DEFERRABLE
> trigger in production, with it apparently working as intended.

What do you mean by "hand-written DEFERRABLE trigger"?  AFAICS from the
grammar, DEFERRABLE and related attributes can only be specified when
you write CREATE CONSTRAINT TRIGGER, so the documentation's statement
appears correct to me.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2011-12-20 21:24:29
Subject: Re: sorting table columns
Previous:From: Alvaro HerreraDate: 2011-12-20 20:53:34
Subject: sorting table columns

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group