@@ -1186,6 +1186,58 @@ explain (costs off) select * from coercepart where a !~ all ('{ab,bc}');
1186
1186
Filter: ((a)::text !~ ALL ('{ab,bc}'::text[]))
1187
1187
(7 rows)
1188
1188
1189
+ explain (costs off) select * from coercepart where a = any ('{ab,bc}');
1190
+ QUERY PLAN
1191
+ -------------------------------------------------------
1192
+ Append
1193
+ -> Seq Scan on coercepart_ab
1194
+ Filter: ((a)::text = ANY ('{ab,bc}'::text[]))
1195
+ -> Seq Scan on coercepart_bc
1196
+ Filter: ((a)::text = ANY ('{ab,bc}'::text[]))
1197
+ (5 rows)
1198
+
1199
+ explain (costs off) select * from coercepart where a = any ('{ab,null}');
1200
+ QUERY PLAN
1201
+ ---------------------------------------------------
1202
+ Seq Scan on coercepart_ab
1203
+ Filter: ((a)::text = ANY ('{ab,NULL}'::text[]))
1204
+ (2 rows)
1205
+
1206
+ explain (costs off) select * from coercepart where a = any (null::text[]);
1207
+ QUERY PLAN
1208
+ --------------------------
1209
+ Result
1210
+ One-Time Filter: false
1211
+ (2 rows)
1212
+
1213
+ explain (costs off) select * from coercepart where a = all ('{ab}');
1214
+ QUERY PLAN
1215
+ ----------------------------------------------
1216
+ Seq Scan on coercepart_ab
1217
+ Filter: ((a)::text = ALL ('{ab}'::text[]))
1218
+ (2 rows)
1219
+
1220
+ explain (costs off) select * from coercepart where a = all ('{ab,bc}');
1221
+ QUERY PLAN
1222
+ --------------------------
1223
+ Result
1224
+ One-Time Filter: false
1225
+ (2 rows)
1226
+
1227
+ explain (costs off) select * from coercepart where a = all ('{ab,null}');
1228
+ QUERY PLAN
1229
+ --------------------------
1230
+ Result
1231
+ One-Time Filter: false
1232
+ (2 rows)
1233
+
1234
+ explain (costs off) select * from coercepart where a = all (null::text[]);
1235
+ QUERY PLAN
1236
+ --------------------------
1237
+ Result
1238
+ One-Time Filter: false
1239
+ (2 rows)
1240
+
1189
1241
drop table coercepart;
1190
1242
CREATE TABLE part (a INT, b INT) PARTITION BY LIST (a);
1191
1243
CREATE TABLE part_p1 PARTITION OF part FOR VALUES IN (-2,-1,0,1,2);
@@ -3157,6 +3209,20 @@ select * from stable_qual_pruning
3157
3209
Filter: (a = ANY ('{"Tue Feb 01 00:00:00 2000 PST","Fri Jan 01 00:00:00 2010 PST"}'::timestamp with time zone[]))
3158
3210
(4 rows)
3159
3211
3212
+ explain (analyze, costs off, summary off, timing off)
3213
+ select * from stable_qual_pruning
3214
+ where a = any(null::timestamptz[]);
3215
+ QUERY PLAN
3216
+ ----------------------------------------------------------------
3217
+ Append (actual rows=0 loops=1)
3218
+ -> Seq Scan on stable_qual_pruning1 (actual rows=0 loops=1)
3219
+ Filter: (a = ANY (NULL::timestamp with time zone[]))
3220
+ -> Seq Scan on stable_qual_pruning2 (actual rows=0 loops=1)
3221
+ Filter: (a = ANY (NULL::timestamp with time zone[]))
3222
+ -> Seq Scan on stable_qual_pruning3 (actual rows=0 loops=1)
3223
+ Filter: (a = ANY (NULL::timestamp with time zone[]))
3224
+ (7 rows)
3225
+
3160
3226
drop table stable_qual_pruning;
3161
3227
--
3162
3228
-- Check that pruning with composite range partitioning works correctly when
0 commit comments