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 B8B72889-D6D7-48FF-B782-D670A6CA4D37@yesql.se
обсуждение исходный текст
Ответ на 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 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.

> Thoughts? If not, I'm going to add errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR) to that.

+1 on using ERRCODE_ARRAY_SUBSCRIPT_ERROR as it better conveys meaning.

cheers ./daniel


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Logical replication CPU-bound with TRUNCATE/DROP/CREATE many tables
Следующее
От: John Naylor
Дата:
Сообщение: small cleanup: unify scanstr() functions