Re: BUG #17842: Adding a qual to a working query gets bogus syntax error - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17842: Adding a qual to a working query gets bogus syntax error
Date
Msg-id 2757854.1678818318@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17842: Adding a qual to a working query gets bogus syntax error  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses AW: BUG #17842: Adding a qual to a working query gets bogus syntax error  (Hans Buschmann <buschmann@nidsa.net>)
List pgsql-bugs
"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



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #17842: Adding a qual to a working query gets bogus syntax error
Next
From: Hans Buschmann
Date:
Subject: AW: BUG #17842: Adding a qual to a working query gets bogus syntax error