Re: BUG #16176: NULL value returned by category_sql argument to crosstab() causes segmentation fault

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16176: NULL value returned by category_sql argument to crosstab() causes segmentation fault
Дата
Msg-id 24798.1577131592@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #16176: NULL value returned by category_sql argument tocrosstab() causes segmentation fault  (Joe Conway <mail@joeconway.com>)
Список pgsql-bugs
Joe Conway <mail@joeconway.com> writes:
> On 12/23/19 1:49 PM, Tom Lane wrote:
>> Hmm, why'd you use ERRCODE_SYNTAX_ERROR, and not say
>> ERRCODE_NULL_VALUE_NOT_ALLOWED?

> To be consistent with the error just above:
> ...
> But I am not married to ERRCODE_SYNTAX_ERROR if you think it ought to be
> changed.

Meh.  (a) ERRCODE_SYNTAX_ERROR is awfully generic, and thereby not very
helpful; (b) it seems hard to me to paint the problem here as being any
form of "syntax" error.

And for that matter, "syntax error" is a crappy classification of the
error just above, too.  IMO it ought to fall under "data exception".
We don't seem to have an errcode for "wrong number of columns",
but maybe we should invent one --- I think the same issue arises in
other places.  Or we could just use generic ERRCODE_DATA_EXCEPTION.

            regards, tom lane



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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: BUG #16176: NULL value returned by category_sql argument tocrosstab() causes segmentation fault
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #16104: Invalid DSA Memory Alloc Request in Parallel Hash