Re: [HACKERS] Consistently catch errors from Python _New() functions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Consistently catch errors from Python _New() functions
Date
Msg-id 5ca74b8f-2c21-893b-d3e5-c819cb0c6f4d@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Consistently catch errors from Python _New() functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 11/18/17 12:05, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> On 11/17/17 12:16, Tom Lane wrote:
>>> I'm confused by the places that change PLy_elog calls to pass NULL:
>>>
>>> -        PLy_elog(ERROR, "could not create globals");
>>> +        PLy_elog(ERROR, NULL);
>>>
>>> How is that an improvement?  Otherwise it looks reasonable.
> 
>> If we pass NULL, then the current Python exception becomes the primary
>> error, so you'd end up with an "out of memory" error of some kind with a
>> stack trace, which seems useful.
> 
> Oh, I see.  Objection withdrawn.

Committed, thanks.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Add Roman numeral conversion to to_number
Next
From: Tomas Vondra
Date:
Subject: spgist rangetypes compiler warning (gcc 7.2.0)