Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f77Hqf642279 for ; Tue, 7 Aug 2001 13:52:41 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 98111; Tue, 07 Aug 2001 10:52:38 -0700 From: "Josh Berkus" Subject: Re: Are circular REFERENCES possible ? To: Jan Wieck , Josh Berkus Cc: Denis Bucher , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Tue, 07 Aug 2001 10:52:38 -0700 Message-ID: In-Reply-To: <200108071654.f77GssQ01998@jupiter.us.greatbridge.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200108/105 X-Sequence-Number: 4326 Jan, > All of this is wrong. If the constraints are defined to be > INITIALLY DEFERRED, all you have to do is to wrap all the > changes that put the database into a temporary inconsistent > state into a transaction. What is a good idea and strongly > advised anyway. > > DEFERRED means, that the consistency WRT the foreign key > constratins will be checked at COMMIT time instead of the > actual statement. So if you Hmmm... sounds interesting. Can this be done through functions? I.E., if I put the INSERT/INSERT/UPDATE operation inside a function, does it automatically wait until the function completes before checking constraints? > Josh, maybe you should buy a newer SQL-bo... :-) > > Got ya (LOL)! Zap! Ouch. ;-) > > The point is that we based our implementation of foreign keys > on the SQL3 specs. DEFERRED is not in SQL-92 AFAIK. > Know a good SQL3 book? I bought O'Reilly's SQL In A Nutshell for that, but the book has numerous omissions and a few mistakes. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco