pgsql: Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR
Date
Msg-id 20060407170539.C08E911F625E@postgresql.org
Whole thread Raw
List pgsql-committers
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.

Modified Files:
--------------
    pgsql/src/backend/optimizer/util:
        restrictinfo.c (r1.46 -> r1.47)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/restrictinfo.c.diff?r1=1.46&r2=1.47)

pgsql-committers by date:

Previous
From: fxjr@pgfoundry.org (User Fxjr)
Date:
Subject: npgsql - Npgsql: 2006-04-07 Francisco Figueiredo Jr.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix make_restrictinfo_from_bitmapqual() to preserve AND/OR