"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Tue, Mar 14, 2023, 11:12 Hans Buschmann <buschmann@nidsa.net> wrote:
>> 2. Why is it reporting an syntax error (supposed at parse time) and not a
>> runtime error (supposed at execution time)
> Your parsed query doesn't have a syntax error. Data it processes does,
> which is found when parsing that data during query execution.
Right. It's kind of unfortunate perhaps that we use SQLSTATEs from
the "syntax error" class for malformed data input, but that seems
unlikely to change. In any case, it's pretty obvious that this error
is not complaining about anything in the text of the query.
regards, tom lane