Re: pgsql constraints and temporal tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Enrico Sirola <enrico(dot)sirola(at)gmail(dot)com>
Cc: pggeneral <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgsql constraints and temporal tables
Date: 2007-12-14 16:06:54
Message-ID: 7902.1197648414@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Enrico Sirola <enrico(dot)sirola(at)gmail(dot)com> writes:
> However, I'm facing a problem I'm not able to solve with postgresql:
> usually updating or deleting time-varying data means to temporary
> violate a constraint in a transaction but ensuring that at the end of
> the transaction the table(s) is(are) in a consistent state, but this
> seems impossible to do because trigger constraints are not deferrable.

Use CREATE CONSTRAINT TRIGGER:
http://developer.postgresql.org/pgdocs/postgres/sql-createconstraint.html

(This statement has been there all along, but was marked as deprecated
in pre-8.3 releases, for now-forgotten reasons.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Charles Mortell 2007-12-14 16:25:47 user name and password woes
Previous Message Greg Smith 2007-12-14 15:37:42 Re: [GENERAL] Slow PITR restore