From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Jan Urbański <wulczer@wulczer.org>
Cc: Mika Eloranta <mel@ohmu.fi>
Cc: pgsql-hackers@postgresql.org
Subject: Re: PL/Python SQL error code pass-through
Date: Thu, 24 Nov 2011 17:15:49 +0200
Message-ID: <4ECE5FA5.6060506@enterprisedb.com> (raw)
In-Reply-To: <4ECDFB26.1090203@wulczer.org>
References: <0174B71F-7940-4819-BDC8-95EC8C9BA833@ohmu.fi>
<4ECDFB26.1090203@wulczer.org>
On 24.11.2011 10:07, Jan Urbański wrote:
> On 23/11/11 17:24, Mika Eloranta wrote:
>> Hi all,
>>
>> [PL/Python in 9.1 does not preserve SQLSTATE of errors]
>
> Oops, you're right, it's a regression from 9.0 behaviour.
>
> The fix looks good to me, I changed one place to indent with tabs
> instead of spaces and added a regression test.
Thank you, both. Is there some other fields that we should propagate
from the original error message that we're missing? Like, context and
file/line information? Or are those left out on purpose? I wonder if we
should have a more wholesale approach, and store the whole ErrorData
struct somewhere, and only add some extra context information with
errcontext().
> I think this should be backpatched to 9.1, no?
Yeah, it should. Your patch probably makes most sense for backpatching,
even if we do something more radical on master.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, wulczer@wulczer.org, mel@ohmu.fi
Subject: Re: PL/Python SQL error code pass-through
In-Reply-To: <4ECE5FA5.6060506@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox