X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EE71FDAF2C for ; Mon, 7 Nov 2005 17:35:21 -0400 (AST) 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 66450-06 for ; Mon, 7 Nov 2005 21:35:19 +0000 (GMT) X-Greylist: delayed 00:05:02.594679 by SQLgrey- Received: from nz.telogis.com (unknown [203.98.10.169]) by svr1.postgresql.org (Postfix) with ESMTP id 47E84DAD86 for ; Mon, 7 Nov 2005 17:35:20 -0400 (AST) Received: from [192.168.3.1] ([192.168.3.1]) by nz.telogis.com with esmtp; Tue, 08 Nov 2005 10:30:16 +1300 id 006BD844.436FC769.00003B46 Message-ID: <436FC767.1010702@telogis.com> Date: Tue, 08 Nov 2005 10:30:15 +1300 From: Ralph Mason User-Agent: Thunderbird 1.4 (Windows/20050908) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Figuring out which command failed Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/124 X-Sequence-Number: 15381 Hi, I have a transaction that has multiple separate command in it (nothing unusual there). However sometimes one of the sql statements will fail and so the whole transaction fails. In some cases I could fix the failing statement if only I knew which one it was. Can anyone think of any way to get which statement actually failed from the error message? If the error message gave me the line of the failure it would be excellent, but it doesn't. Perhaps it would be easy for me to patch my version of Postgres to do that? I realize I could do this with 2 phase commit, but that isn't ready yet! Any thoughts or ideas are much appreciated Thanks Ralph