Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 232041337B95 for ; Fri, 29 Oct 2010 11:04:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 55852-08 for ; Fri, 29 Oct 2010 14:03:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 7DDAD1337B8E for ; Fri, 29 Oct 2010 11:03:52 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o9TE3qTL000672; Fri, 29 Oct 2010 10:03:52 -0400 (EDT) To: Dragos Valentin Moinescu cc: pgsql-admin@postgresql.org Subject: Re: plpythonu: how to catch plpy.execute() exceptions In-reply-to: References: Comments: In-reply-to Dragos Valentin Moinescu message dated "Fri, 29 Oct 2010 16:02:53 +0300" Date: Fri, 29 Oct 2010 10:03:51 -0400 Message-ID: <671.1288361031@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/210 X-Sequence-Number: 35951 Dragos Valentin Moinescu writes: > The thing is that I cannot catch the exception raised by plpy.execute(). Yeah, plpython's error handling is fundamentally broken. Somebody needs to rewrite it to be more like the other PLs. In the meantime, I'd suggest using plperl, which has gotten a lot more love than plpython ever did. regards, tom lane