|
10 | 10 | *
|
11 | 11 | *
|
12 | 12 | * IDENTIFICATION
|
13 |
| - * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.187 2005/04/2503:58:30 tgl Exp $ |
| 13 | + * $PostgreSQL: pgsql/src/backend/optimizer/plan/createplan.c,v 1.188 2005/04/2504:27:12 tgl Exp $ |
14 | 14 | *
|
15 | 15 | *-------------------------------------------------------------------------
|
16 | 16 | */
|
@@ -889,6 +889,14 @@ create_bitmap_scan_plan(Query *root,
|
889 | 889 | /* Sort clauses into best execution order */
|
890 | 890 | qpqual=order_qual_clauses(root,qpqual);
|
891 | 891 |
|
| 892 | +/* |
| 893 | + * When dealing with special or lossy operators, we will at this point |
| 894 | + * have duplicate clauses in qpqual and bitmapqualorig. We may as well |
| 895 | + * drop 'em from bitmapqualorig, since there's no point in making the |
| 896 | + * tests twice. |
| 897 | + */ |
| 898 | +bitmapqualorig=list_difference_ptr(bitmapqualorig,qpqual); |
| 899 | + |
892 | 900 | /* Finally ready to build the plan node */
|
893 | 901 | scan_plan=make_bitmap_heapscan(tlist,
|
894 | 902 | qpqual,
|
|