X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5CF8C3A3E90 for ; Thu, 11 Nov 2004 19:31:50 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 10331-03 for ; Thu, 11 Nov 2004 19:31:40 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id BFDF83A4157 for ; Thu, 11 Nov 2004 19:31:39 +0000 (GMT) Received: (qmail-ldap/ctrl 52804 invoked from network); 11 Nov 2004 19:31:35 -0000 Received: from unknown (HELO bazaar.foomatic.at) ([213.129.239.202]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 11 Nov 2004 19:31:35 -0000 Received: from localhost (bazaar.foomatic.lan [127.0.0.1]) by bazaar.foomatic.at (Postfix) with ESMTP id F266BDF436; Thu, 11 Nov 2004 20:31:37 +0100 (CET) Received: from bazaar.foomatic.at ([127.0.0.1]) by localhost (bazaar.foomatic.at [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28959-06; Thu, 11 Nov 2004 20:31:37 +0100 (CET) Received: from weyoun (Weyoun.foomatic.lan [192.168.15.239]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by bazaar.foomatic.at (Postfix) with ESMTP id 71C05DF425; Thu, 11 Nov 2004 20:31:37 +0100 (CET) Content-Type: text/plain; charset="iso-8859-1" From: Stefan Weiss Organization: Foo Orbital Operations To: Gaetano Mendola Subject: Re: A transaction in transaction? Possible? Date: Thu, 11 Nov 2004 20:31:27 +0100 User-Agent: KMail/1.4.3 References: <200411102236.41971.spaceman@foo.at> <4193217C.9080900@bigfoot.com> In-Reply-To: <4193217C.9080900@bigfoot.com> Cc: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200411112031.27766.spaceman@foo.at> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at foomatic.at X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/121 X-Sequence-Number: 19440 On Thursday, 11 November 2004 09:23, Gaetano Mendola wrote: > Stefan Weiss wrote: > > These tables are connected by foreign keys, but without "on delete" > > triggers. > > Why "without" ? Are you looking to solve a problem introduced by > yourself ? There are numerous checks involved before a customer (or a contact) can be deleted, and not all of these checks can be done by querying the database. Sometimes triggers aren't enough. > You can handle this task using the new functionality introduced with > savepoint: the exception. For more information look at: > http://candle.pha.pa.us/main/writings/pgsql/sgml/plpgsql-control-structures >.html#PLPGSQL-ERROR-TRAPPING The "delete contact" and "delete customer" functions are not stored procedures, so I'm not sure how this can help. thanks, stefan