Re: Potential reference miscounts and segfaults in plpython.c

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема Re: Potential reference miscounts and segfaults in plpython.c
Дата
Msg-id 4F43D43D.7030801@wulczer.org
обсуждение исходный текст
Ответ на Re: Potential reference miscounts and segfaults in plpython.c  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Potential reference miscounts and segfaults in plpython.c  (Jan Urbański <wulczer@wulczer.org>)
Список pgsql-hackers
On 21/02/12 18:05, Peter Eisentraut wrote:
> On sön, 2012-02-19 at 22:29 -0500, Tom Lane wrote:
>> My only comment is whether elog(ERROR) is appropriate, ie, do we
>> consider these to be internal errors that users will never see in
>> practice? If there's a significant risk of the error being thrown in
>> the field, it might be better to use ereport, to expose the message
>> for translation.
> 
> I find the wording of the error messages a bit inappropriate.  For
> example,
> 
>         list = PyList_New(length);
> +       if (list == NULL)
> +               elog(ERROR, "could not transform Python list to array");
> 
> The error is not about the transforming, it's about creating a new list.

Well, what I tried to convery here was that the process of transforming
a Python list to a Postgres array failed. Which, by the way, is wrong
since this function transforms a Postgres array to a Python list...

After giving it some thought some of these elogs could be changed into
PLy_elogs (which is meant to propagate a Python error into Postgres) and
the others made into ereports.

I'll send updated patches this evening (CET).

Cheers,
Jan


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Correctly initialise shared recoveryLastRecPtr in recovery.
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Review: alternate psql file locations