Re: Error code missing for "wrong length of inner sequence" error

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Error code missing for "wrong length of inner sequence" error
Дата
Msg-id 03C6B5AE-69E1-46BB-B230-302CE97035BE@yesql.se
обсуждение исходный текст
Ответ на Re: Error code missing for "wrong length of inner sequence" error  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: Error code missing for "wrong length of inner sequence" error  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
> On 2 Oct 2020, at 13:44, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>
> On 01/10/2020 14:21, Daniel Gustafsson wrote:
>>> On 1 Oct 2020, at 12:54, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>>> Most checks when converting between SQL and Python types use the PLy_elog() function, which uses the genericc
ERRCODE_EXTERNAL_ROUTINE_EXCEPTIONerror code, but I think ERRCODE_ARRAY_SUBSCRIPT_ERROR is better. 
>> On that note, wouldn't the dimension check errors in PLySequence_ToArray be
>> just as well off using normal ereport()'s?  Only one of them seem to error out
>> in a way that could propagate an error from Python to postgres.
>
> Yes, you are right. I was going to say that we are not very consistent on when to use ereport() and when PLy_elog()
ingeneral, but looking closer, we are. Outside the array-conversion functions, PLy_elog() is only used when a Python C
APIcall fails, and ereport() is used otherwise. 

I did another scan as well and couldn't find any other offenders.

> Patch attached.

LGTM.

cheers ./daniel


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

Предыдущее
От: a.pervushina@postgrespro.ru
Дата:
Сообщение: Re: [HACKERS] make async slave to wait for lsn to be replayed
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: Should walsernder check correctness of WAL records?