Re: Redundant Unique plan node for table with a unique index - Mailing list pgsql-hackers

From Andy Fan
Subject Re: Redundant Unique plan node for table with a unique index
Date
Msg-id CAKU4AWp60USTODSvve3-iQJ5um=SQLXJ95AvmdO9A6+qcS9LTA@mail.gmail.com
Whole thread Raw
In response to Re: Redundant Unique plan node for table with a unique index  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Redundant Unique plan node for table with a unique index
List pgsql-hackers

I don't think this is a good way to do this.  The method you're using
only supports this optimisation when querying a table directly.  If
there were subqueries, joins, etc then it wouldn't work as there are
no unique indexes.  You should probably have a look at [1] to see
further details of an alternative method without the said limitations.

David

[1] https://postgr.es/m/flat/CAKU4AWqZvSyxroHkbpiHSCEAY2C41dG7VWs%3Dc188KKznSK_2Zg%40mail.gmail.com


The nullable tracking blocker probably has been removed by varnullingrels
so I will start working on UniqueKey stuff very soon, thank you David
for remember of this feature!

--
Best Regards
Andy Fan

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Inefficiency in parallel pg_restore with many tables
Next
From: Michael Paquier
Date:
Subject: Re: Avoid a possible null pointer (src/backend/utils/adt/pg_locale.c)