Re: array_in sub function ReadArrayDimensions error message - Mailing list pgsql-hackers

From Tom Lane
Subject Re: array_in sub function ReadArrayDimensions error message
Date
Msg-id 1389351.1720540745@sss.pgh.pa.us
Whole thread Raw
In response to Re: array_in sub function ReadArrayDimensions error message  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: array_in sub function ReadArrayDimensions error message
List 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 by date:

Previous
From: Antonin Houska
Date:
Subject: Re: why there is not VACUUM FULL CONCURRENTLY?
Next
From: Antonin Houska
Date:
Subject: Re: why there is not VACUUM FULL CONCURRENTLY?