@@ -1168,6 +1168,58 @@ explain (costs off) select * from coercepart where a !~ all ('{ab,bc}');
1168
1168
Filter: ((a)::text !~ ALL ('{ab,bc}'::text[]))
1169
1169
(7 rows)
1170
1170
1171
+ explain (costs off) select * from coercepart where a = any ('{ab,bc}');
1172
+ QUERY PLAN
1173
+ -------------------------------------------------------
1174
+ Append
1175
+ -> Seq Scan on coercepart_ab
1176
+ Filter: ((a)::text = ANY ('{ab,bc}'::text[]))
1177
+ -> Seq Scan on coercepart_bc
1178
+ Filter: ((a)::text = ANY ('{ab,bc}'::text[]))
1179
+ (5 rows)
1180
+
1181
+ explain (costs off) select * from coercepart where a = any ('{ab,null}');
1182
+ QUERY PLAN
1183
+ ---------------------------------------------------
1184
+ Seq Scan on coercepart_ab
1185
+ Filter: ((a)::text = ANY ('{ab,NULL}'::text[]))
1186
+ (2 rows)
1187
+
1188
+ explain (costs off) select * from coercepart where a = any (null::text[]);
1189
+ QUERY PLAN
1190
+ --------------------------
1191
+ Result
1192
+ One-Time Filter: false
1193
+ (2 rows)
1194
+
1195
+ explain (costs off) select * from coercepart where a = all ('{ab}');
1196
+ QUERY PLAN
1197
+ ----------------------------------------------
1198
+ Seq Scan on coercepart_ab
1199
+ Filter: ((a)::text = ALL ('{ab}'::text[]))
1200
+ (2 rows)
1201
+
1202
+ explain (costs off) select * from coercepart where a = all ('{ab,bc}');
1203
+ QUERY PLAN
1204
+ --------------------------
1205
+ Result
1206
+ One-Time Filter: false
1207
+ (2 rows)
1208
+
1209
+ explain (costs off) select * from coercepart where a = all ('{ab,null}');
1210
+ QUERY PLAN
1211
+ --------------------------
1212
+ Result
1213
+ One-Time Filter: false
1214
+ (2 rows)
1215
+
1216
+ explain (costs off) select * from coercepart where a = all (null::text[]);
1217
+ QUERY PLAN
1218
+ --------------------------
1219
+ Result
1220
+ One-Time Filter: false
1221
+ (2 rows)
1222
+
1171
1223
drop table coercepart;
1172
1224
CREATE TABLE part (a INT, b INT) PARTITION BY LIST (a);
1173
1225
CREATE TABLE part_p1 PARTITION OF part FOR VALUES IN (-2,-1,0,1,2);
@@ -3139,6 +3191,20 @@ select * from stable_qual_pruning
3139
3191
Filter: (a = ANY ('{"Tue Feb 01 00:00:00 2000 PST","Fri Jan 01 00:00:00 2010 PST"}'::timestamp with time zone[]))
3140
3192
(4 rows)
3141
3193
3194
+ explain (analyze, costs off, summary off, timing off)
3195
+ select * from stable_qual_pruning
3196
+ where a = any(null::timestamptz[]);
3197
+ QUERY PLAN
3198
+ ----------------------------------------------------------------
3199
+ Append (actual rows=0 loops=1)
3200
+ -> Seq Scan on stable_qual_pruning1 (actual rows=0 loops=1)
3201
+ Filter: (a = ANY (NULL::timestamp with time zone[]))
3202
+ -> Seq Scan on stable_qual_pruning2 (actual rows=0 loops=1)
3203
+ Filter: (a = ANY (NULL::timestamp with time zone[]))
3204
+ -> Seq Scan on stable_qual_pruning3 (actual rows=0 loops=1)
3205
+ Filter: (a = ANY (NULL::timestamp with time zone[]))
3206
+ (7 rows)
3207
+
3142
3208
drop table stable_qual_pruning;
3143
3209
--
3144
3210
-- Check that pruning with composite range partitioning works correctly when
0 commit comments