pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Alexander Lakhin <exclusion@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Andrei Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Gregory Stark (as CFM) <stark.cfm@gmail.com>
Cc: Michał Kłeczek <michal@kleczek.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Richard Guo <guofenglinux@gmail.com>
Subject: Re: Removing unneeded self joins
Date: Tue, 9 Jan 2024 07:00:01 +0300
Message-ID: <b9e8f460-f9a6-0e9b-e8ba-60d59f0bc22c@gmail.com> (raw )
In-Reply-To: <CAPpHfdvu+wyazT+ujJbJ5rKZrHQoG+FCVeWENA4pyf_A1W1WAA@mail.gmail.com >
References: <64486b0b-0404-e39e-322d-0801154901f3@postgrespro.ru >
<CAPpHfdsQkY0Gu7bQ9Ekdyzo_5Xxz74TYKbwmk1on1WAASpxXcQ@mail.gmail.com >
<8800ccf2-ae82-461c-92a1-d4c0a22f8cf2@postgrespro.ru >
<CAPpHfdvJ3jBQaJQKrf69K++kXi+Tvzn6TXO-DKXj0KVJjvMebg@mail.gmail.com >
<1bd80083-a13e-4e9f-a7ce-73c3faab521c@postgrespro.ru >
<CAPpHfdsz8E085YF2VoJe2+h4YAShsh7p--t3kQfQTntiCy63Xg@mail.gmail.com >
<922623af-872e-4cdc-9238-129b18bee42d@postgrespro.ru >
<CAPpHfduoAHTp6O7Q8PDe_w=30v0n_06pGe5M65iR4DYcfaYnRw@mail.gmail.com >
<107682e0-137a-d0fb-2733-7fc6e9562690@gmail.com >
<CAPpHfduLxYm4biJrTbjBxTAW6vkxBswuQ2B=gXU+c37QJd6+Ow@mail.gmail.com >
<a89f480f-8143-0965-f22d-0a892777f501@gmail.com >
<0c5f461f-e26f-4fd9-9700-91b0e9c38fd6@postgrespro.ru >
<336c748b-4ffe-5915-3d3c-ece6d19e021c@gmail.com >
<4788f781-31bd-9796-d7d6-588a751c8787@gmail.com >
<CAPpHfduYKqbWWT=YuBJyoExrwsJSgjUuJN1Gsr2YZMG=nh_ctQ@mail.gmail.com >
<CAPpHfdvu+wyazT+ujJbJ5rKZrHQoG+FCVeWENA4pyf_A1W1WAA@mail.gmail.com >
09.01.2024 01:09, Alexander Korotkov wrote:
> Fixed in 30b4955a46.
Thank you for fixing that!
I've found another anomaly coined with d3d55ce57. This query:
CREATE TABLE t(a int PRIMARY KEY, b int);
INSERT INTO t VALUES (1, 1), (2, 1);
WITH t1 AS (SELECT * FROM t)
UPDATE t SET b = t1.b + 1 FROM t1
WHERE t.a = t1.a RETURNING t.a, t1.b;
gives "ERROR: variable not found in subplan target lists" on d3d55ce57, but
starting from a7928a57b it gives an incorrect result:
a | b
---+---
1 | 2
2 | 2
(2 rows)
Best regards,
Alexander
view thread (247+ messages) latest in thread
Message-ID: <b9e8f460-f9a6-0e9b-e8ba-60d59f0bc22c@gmail.com>
Permalink: ../b9e8f460-f9a6-0e9b-e8ba-60d59f0bc22c@gmail.com/
Also on: postgresql.org/message-id/b9e8f460-f9a6-0e9b-e8ba-60d59f0bc22c@gmail.com
copy link · copy postgr.es
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-hackers@postgresql.org
Cc: exclusion@gmail.com, aekorotkov@gmail.com, a.lepikhov@postgrespro.ru, stark.cfm@gmail.com, michal@kleczek.org, pgsql-hackers@lists.postgresql.org, guofenglinux@gmail.com
Subject: Re: Removing unneeded self joins
In-Reply-To: <b9e8f460-f9a6-0e9b-e8ba-60d59f0bc22c@gmail.com>
* 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