X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5A97DD1D2A4 for ; Mon, 22 Mar 2004 14:21:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 08204-08 for ; Mon, 22 Mar 2004 10:21:28 -0400 (AST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 6D832D1D29D for ; Mon, 22 Mar 2004 10:21:19 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 5635035A2C; Mon, 22 Mar 2004 06:21:28 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 54B1C35A2B; Mon, 22 Mar 2004 06:21:28 -0800 (PST) Date: Mon, 22 Mar 2004 06:21:28 -0800 (PST) From: Stephan Szabo To: Erik Thiele Cc: Achilleus Mantzios , pgsql-sql@postgresql.org Subject: Re: special integrity constraints In-Reply-To: <20040322112659.4553df76.erik@thiele-hydraulik.de> Message-ID: <20040322061854.W56073@megazone.bigpanda.com> References: <20040322102031.6a6f0b77.erik@thiele-hydraulik.de> <20040322112659.4553df76.erik@thiele-hydraulik.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/218 X-Sequence-Number: 17317 On Mon, 22 Mar 2004, Erik Thiele wrote: > On Mon, 22 Mar 2004 12:13:29 +0200 (EET) > Achilleus Mantzios wrote: > > > O kyrios Erik Thiele egrapse stis Mar 22, 2004 : > > > > Did you check out the DEFERRABLE option on the constraint? > > > > DEFERRABLE > NOT DEFERRABLE > > This controls whether the constraint can be deferred. A constraint that > is not deferrable will be checked immediately after every command. > Checking of constraints that are deferrable may be postponed until the > end of the transaction (using the SET CONSTRAINTS command). NOT > DEFERRABLE is the default. > > !!!! Only foreign key constraints currently accept > this clause. All other constraint types are not deferrable. !!!! > > my constraint is not a foreign key constraint.... However, foreign keys are implemented using "constraint triggers". They're really not documented much (because they're a not really separately supported implementation detail), but you can theoretically make triggers that are deferred to immediately before commit time.