Re: BUG #16176: NULL value returned by category_sql argument to crosstab() causes segmentation fault
Tom Lane <[email protected]> Mon, 23 Dec 2019 15:06:32 -0500
| Newsgroups | gmane.comp.db.postgresql.bugs |
|---|---|
| Message-ID | <[email protected]> |
Joe Conway <[email protected]> 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