Re: Removing unneeded self joins - Mailing list pgsql-hackers

From Andrey Lepikhov
Subject Re: Removing unneeded self joins
Date
Msg-id 8556348d-b5fa-728a-e4db-8dcad9d11e4b@postgrespro.ru
Whole thread Raw
In response to Re: Removing unneeded self joins  (Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>)
Responses Re: Removing unneeded self joins
List pgsql-hackers
Alexander Lakhin detected the bug in the 'remove self joins' patch:

test:
=====

CREATE TABLE t (a INT UNIQUE);
INSERT INTO t VALUES (1);
SELECT 1 FROM (SELECT x.* FROM t AS x, t AS y WHERE x.a = y.a) AS q, 
LATERAL generate_series(1, q.a) gs(i);

Description:
============

FUNCTIONS, TABLEFUNCS and VALUES plan nodes uses direct link to the rte 
table. We need to change varno references to relid which will be kept.

Version v.17 of the patch that fix the bug see in attachment.

-- 
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company

Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: benchmarking Flex practices
Next
From: Michael Paquier
Date:
Subject: Re: MSVC Build support with visual studio 2019