Allow rel_is_distinct_for() to look through RelabelType below OpExpr.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 6f44fe7f121ac7c29c1ac8553e4e209f9c3bfbcb
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2017-09-17T19:28:51Z
Releases: 11.0
Allow rel_is_distinct_for() to look through RelabelType below OpExpr.

This lets it do the right thing for, eg, varchar columns.
Back-patch to 9.5 where this logic appeared.

David Rowley, per report from Kim Rose Carlsen

Discussion: https://postgr.es/m/VI1PR05MB17091F9A9876528055D6A827C76D0@VI1PR05MB1709.eurprd05.prod.outlook.com

Files

PathChange+/−
src/backend/optimizer/plan/analyzejoins.c modified +8 −0

Discussion