Re: [HACKERS] Consistently catch errors from Python _New() functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Consistently catch errors from Python _New() functions
Дата
Msg-id 26289.1511024718@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Consistently catch errors from Python _New() functions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] Consistently catch errors from Python _New() functions
Список pgsql-hackers
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.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sophie Herold
Дата:
Сообщение: Re: to_typemod(type_name) information function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Add Roman numeral conversion to to_number