From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dragos Valentin Moinescu <dragos(dot)moinescu(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: plpythonu: how to catch plpy.execute() exceptions |
Date: | 2010-10-29 14:55:29 |
Message-ID: | AANLkTikwhXHub2HWisYTY4e74gw+Sz6HVBsrTW2ktYW8@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 29 October 2010 18:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> writes:
>> On 29 October 2010 17:02, Dragos Valentin Moinescu
>> <dragos(dot)moinescu(at)gmail(dot)com> wrote:
>>> The thing is that I cannot catch the exception raised by plpy.execute().
>
>> I came to this plpython function template. It handles errors properly
>> and works faster then usual function because of the code caching.
>
> Really? As far as I can see, it's entirely impossible for a plpython
> function to trap and recover from an error in plpy.execute. It can
> continue to run plain python code, but it won't be allowed to call
> plpy.execute again, and the error will be rethrown when control exits
> the function. There's no way to fix that short of setting up
> subtransactions, which is what the other PLs do.
Oh I am sorry for bothering you and other members. I have not read the
problem properly - my fault.
>
> regards, tom lane
>
--
Sergey Konoplev
Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray(dot)ru(at)gmail(dot)com / Skype: gray-hemp
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2010-10-29 16:27:21 | Re: plpythonu: how to catch plpy.execute() exceptions |
Previous Message | Tom Lane | 2010-10-29 14:40:12 | Re: plpythonu: how to catch plpy.execute() exceptions |