]> granicus.if.org Git - postgresql/commit
Don't trust deferred-unique indexes for join removal.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Oct 2011 04:43:39 +0000 (00:43 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Oct 2011 04:43:39 +0000 (00:43 -0400)
commit0f39d5050dc0dce99258381f33f1832c437aff85
tree90583250bd5cf7878686bad038ec74e9dd292744
parentbb446b689b6681eb57a8a50605e119743190c4db
Don't trust deferred-unique indexes for join removal.

The uniqueness condition might fail to hold intra-transaction, and assuming
it does can give incorrect query results.  Per report from Marti Raudsepp,
though this is not his proposed patch.

Back-patch to 9.0, where both these features were introduced.  In the
released branches, add the new IndexOptInfo field to the end of the struct,
to try to minimize ABI breakage for third-party code that may be examining
that struct.
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/util/plancat.c
src/backend/utils/adt/selfuncs.c
src/include/nodes/relation.h