pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Hans Buschmann <buschmann@nidsa.net>
Cc: PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17842: Adding a qual to a working query gets bogus syntax error
Date: Tue, 14 Mar 2023 14:25:18 -0400
Message-ID: <2757854.1678818318@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwZeb+TFWNsaX3Mo8g3qK8AA_Fdzw+wjpKakx4Siq_oCWQ@mail.gmail.com>
References: <17842-0697f895ced573ee@postgresql.org>
	<2692255.1678810846@sss.pgh.pa.us>
	<dd6cfce2fca54079b1ad7cd044ee4b38@nidsa.net>
	<CAKFQuwZeb+TFWNsaX3Mo8g3qK8AA_Fdzw+wjpKakx4Siq_oCWQ@mail.gmail.com>

"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





view thread (5+ messages)  latest in thread

Message-ID: <2757854.1678818318@sss.pgh.pa.us>
Permalink:  ../2757854.1678818318@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2757854.1678818318@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, buschmann@nidsa.net, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17842: Adding a qual to a working query gets bogus syntax error
  In-Reply-To: <2757854.1678818318@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox