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

Deferrerable Check constraints

From: "Luiz K(dot) Matsumura" <luiz(at)planit(dot)com(dot)br>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Deferrerable Check constraints
Date: 2008-11-24 13:40:18
Message-ID: 492AAEC2.5030609@planit.com.br (view raw or flat)
Thread:
Lists: pgsql-novice
Hi All,

Need a Help. Can a check constraint be deferred until the end of a 
transaction  ?
In other words, if i have a constraint like this:

CREATE TABLE test
(
  id serial NOT NULL,
  qt1 integer NOT NULL DEFAULT 0,
  qt2 integer NOT NULL DEFAULT 0,
  CONSTRAINT check_qt CHECK (qt1 <= qt2)
)

There are some manner that allow qt1 to be greater than qt2 on a 
intermediate state of the transaction ?

Thanks in Advance

-- 
Luiz K. Matsumura
Plan IT Tecnologia Informática Ltda.


Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2008-11-24 13:54:15
Subject: Re: Deferrerable Check constraints
Previous:From: Tim BowdenDate: 2008-11-22 04:37:47
Subject: Re: Roles

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