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 77C463A3CD1 for ; Wed, 24 Nov 2004 19:53:40 +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 50586-10 for ; Wed, 24 Nov 2004 19:53:31 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 82F903A3FF5 for ; Wed, 24 Nov 2004 19:53:31 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id iAOJrRZN012728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Nov 2004 12:53:30 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id iAOJrR1h075109; Wed, 24 Nov 2004 12:53:27 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id iAOJrRpx075108; Wed, 24 Nov 2004 12:53:27 -0700 (MST) (envelope-from mfuhr) Date: Wed, 24 Nov 2004 12:53:27 -0700 From: Michael Fuhr To: Mark Dilger Cc: pgsql-sql@postgresql.org Subject: Re: Explicitly rolling back transaction from within a C-Language function Message-ID: <20041124195327.GA75087@winnie.fuhr.org> References: <20041124192330.5327.qmail@web52804.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041124192330.5327.qmail@web52804.mail.yahoo.com> 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/252 X-Sequence-Number: 19571 On Wed, Nov 24, 2004 at 11:23:30AM -0800, Mark Dilger wrote: > To clarify what I think I want: I would like the > C-Language function to return an error condition to > Postgres that will cause the current Postgres > transaction to abort. I do not know how to do this. See the "Reporting Errors Within the Server" documentation: http://www.postgresql.org/docs/7.4/static/error-message-reporting.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/