From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: lxndrkrlv@gmail.com <lxndrkrlv@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause
Date: Fri, 19 Aug 2022 10:21:00 -0400
Message-ID: <Yv+cTDKXsaLrOwMo@momjian.us> (raw)
In-Reply-To: <Yv7wRmKX01Q2gfPo@momjian.us>
References: <17233-afb9d806aaa64b17@postgresql.org>
<CAKFQuwbnETbhnBYtMA8HNJwf0ipwAETd58=K0JzPs22Of2ZhcA@mail.gmail.com>
<1409812.1634481258@sss.pgh.pa.us>
<Yv6xeki829pitIXd@momjian.us>
<2792105.1660859528@sss.pgh.pa.us>
<Yv7wRmKX01Q2gfPo@momjian.us>
On Thu, Aug 18, 2022 at 10:07:02PM -0400, Bruce Momjian wrote:
> > While we don't insist that hints be 100% accurate, it's not good
> > if they're wildly unhelpful. So I'm not sure if we can determine
> > whether or not it's likely to be on-point.
> >
> > I didn't look too closely at your other examples.
>
> Yeah, I think someone will have to have a new idea to improve this.
Thinking some more, my point is that this error message is being
generated for three cases I know of:
1. email reporters case of CTID column, which is fixed by table
qualification
2. adding LATERAL
3. UPDATE/DELETE where adding LATERAL doesn't fix the query
We can't simply improve the error message because there are unfixable
cases, and we know of two possible fixes.
To improve things, it would be good if we could determine if LATERAL
will really fix the error, or at least detect one of the cases above we
have a clearer way to suggest a fix.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Indecision is a decision. Inaction is an action. Mark Batterson
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: bruce@momjian.us, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, lxndrkrlv@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17233: Incorrect behavior of DELETE command with bad subquery in WHERE clause
In-Reply-To: <Yv+cTDKXsaLrOwMo@momjian.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