Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR flatness of its

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

Commit: 2f8a7bf2909f7434402a9066d258f74f3e132eb4
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-04-07T17:05:39Z
Releases: 8.2.0
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.

Files

PathChange+/−
src/backend/optimizer/util/restrictinfo.c modified +39 −8