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

From Alexander Kuzmenkov
Subject Re: Removing unneeded self joins
Date
Msg-id 2285d5d0-f330-e8b6-9ee5-b2b90e44409b@postgrespro.ru
Whole thread Raw
In response to Re: Removing unneeded self joins  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: Removing unneeded self joins
Re: Removing unneeded self joins
List pgsql-hackers
On 07/29/2018 01:42 PM, Thomas Munro wrote:
>
> I think you need to disable the optimisation when there is a locking
> clause on one side.  Maybe it could be allowed if it's on both sides?
> Not sure.

Hi Thomas,

Thanks for testing. I think it should be OK to remove the join if the 
row marks for both sides have the same type. I added the code to check 
for that.

> You can't declare a variable here in C89.
>

Fixed.

-- 
Alexander Kuzmenkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


Attachment

pgsql-hackers by date:

Previous
From: Cynthia Shang
Date:
Subject: Re: Allow COPY's 'text' format to output a header
Next
From: Robert Haas
Date:
Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled.