Re: array_in sub function ReadArrayDimensions error message

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: array_in sub function ReadArrayDimensions error message
Дата
Msg-id 1389351.1720540745@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: array_in sub function ReadArrayDimensions error message  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: array_in sub function ReadArrayDimensions error message
Список pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> One possibility all this ignores is that what we are calling
> array-dimensions are in reality most likely a user using json array syntax
> in our SQL arrays.  That seems eminently more likely than someone
> mis-typing this niche incantation of building an array literal nowadays.

Yeah, that's a good point.

> I'd add a hint if the first symbol is [ and we fail to get to the point of
> actually seeing the equal sign or the first subsequent unquoted symbol is a
> comma instead of a colon.

That seems closely related to my suggestion of applying strchr() to
see if the character we are expecting to see actually appears
anywhere.  Or did you have something else in mind?  Please be
specific, both about the test you are thinking of and how the
message should be worded.

            regards, tom lane



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