Re: subquery column error causes data destroying equality - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: subquery column error causes data destroying equality
Date
Msg-id CAKFQuwZhZqSQjN2hJKxwhx9uCXTtQsXQUJ9=kS-hGMuVCj_fuw@mail.gmail.com
Whole thread Raw
In response to subquery column error causes data destroying equality  (Cy <frompostgres@cy1.allowed.org>)
List pgsql-bugs
On Sat, Jul 25, 2020 at 3:32 AM Cy <frompostgres@cy1.allowed.org> wrote:
update comic.panels set medium = x'2a958'::int where page = (
select page from comic.pages where comic = x'1db'::int and which = 0);

Unfortunately, I forgot that the column in the "pages" table was named "id" not "page".
This would have been the correct query:

update comic.panels set medium = x'2a958'::int where page = (
select id from comic.pages where comic = x'1db'::int and which = 0);

So... please have errors in subqueries cause the surrounding query to fail.

Won't happen.

I'm using version 13devel, git commit 9f87ae38eaffcc7f72c45bfeb79e09dd6e8c2f48 so if the
bug has been fixed since then, feel free to ignore me.

This isn't a bug.

David J.

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16554: Consistent sequence gaps occuring next day
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #16554: Consistent sequence gaps occuring next day