Re: BUG #17842: Adding a qual to a working query gets bogus syntax error

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Hans Buschmann <buschmann@nidsa.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Date: 2023-03-14T19:26:41Z
Lists: pgsql-bugs
On Tue, Mar 14, 2023, 12:08 Hans Buschmann <buschmann@nidsa.net> wrote:

>
> I think this qual pushdown is dangerous, because it is applied before the
> join and so includes invalid cases.
>

Well, it's better than any alternative that is more expensive even when the
data in question isn't prone to parsing problems.  We optimize for the
common case of consistent normalized data.  You have tools if you need to
operate with bad data.

David J.




>  tom lane
>