Log Message:
-----------
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/util:
        restrictinfo.c (r1.41.2.3 -> r1.41.2.4)
        
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/restrictinfo.c.diff?r1=1.41.2.3&r2=1.41.2.4)

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to