"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