]> granicus.if.org Git - postgresql/commit
Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR flatness of its
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Apr 2006 17:05:47 +0000 (17:05 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Apr 2006 17:05:47 +0000 (17:05 +0000)
commit23c6f11b09adc48e1f788fb334e7786dc99913dc
tree8e5edaa1a449704a7522f067e3592146a2f19052
parent69ab90c7753c08bd192f70c24fab178c7261b829
Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR flatness of its
output, ie, no OR immediately below an OR.  Otherwise we get Asserts or
wrong answers for cases such as
select * from tenk1 a, tenk1 b
where (a.ten = b.ten and (a.unique1 = 100 or a.unique1 = 101))
   or (a.hundred = b.hundred and a.unique1 = 42);
Per report from Rafael Martinez Guerrero.
src/backend/optimizer/util/restrictinfo.c