@@ -285,6 +285,93 @@ select test.pathman_test_5(); /* projection tests for RuntimeXXX nodes */
285
285
ok
286
286
(1 row)
287
287
288
+ /* RuntimeAppend (join, enabled parent) */
289
+ select pathman.set_enable_parent('test.runtime_test_1', true);
290
+ set_enable_parent
291
+ -------------------
292
+
293
+ (1 row)
294
+
295
+ explain (costs off)
296
+ select from test.runtime_test_1 as t1
297
+ join (select * from test.run_values limit 4) as t2 on t1.id = t2.val;
298
+ QUERY PLAN
299
+ --------------------------------------------------------------------------------
300
+ Nested Loop
301
+ -> Limit
302
+ -> Seq Scan on run_values
303
+ -> Custom Scan (RuntimeAppend)
304
+ -> Index Only Scan using runtime_test_1_pkey on runtime_test_1 t1
305
+ Filter: (run_values.val = id)
306
+ -> Index Only Scan using runtime_test_1_0_pkey on runtime_test_1_0 t1
307
+ Index Cond: (id = run_values.val)
308
+ -> Index Only Scan using runtime_test_1_1_pkey on runtime_test_1_1 t1
309
+ Index Cond: (id = run_values.val)
310
+ -> Index Only Scan using runtime_test_1_2_pkey on runtime_test_1_2 t1
311
+ Index Cond: (id = run_values.val)
312
+ -> Index Only Scan using runtime_test_1_3_pkey on runtime_test_1_3 t1
313
+ Index Cond: (id = run_values.val)
314
+ -> Index Only Scan using runtime_test_1_4_pkey on runtime_test_1_4 t1
315
+ Index Cond: (id = run_values.val)
316
+ -> Index Only Scan using runtime_test_1_5_pkey on runtime_test_1_5 t1
317
+ Index Cond: (id = run_values.val)
318
+ (18 rows)
319
+
320
+ select from test.runtime_test_1 as t1
321
+ join (select * from test.run_values limit 4) as t2 on t1.id = t2.val;
322
+ --
323
+ (4 rows)
324
+
325
+ /* RuntimeAppend (join, disabled parent) */
326
+ select pathman.set_enable_parent('test.runtime_test_1', false);
327
+ set_enable_parent
328
+ -------------------
329
+
330
+ (1 row)
331
+
332
+ explain (costs off)
333
+ select from test.runtime_test_1 as t1
334
+ join (select * from test.run_values limit 4) as t2 on t1.id = t2.val;
335
+ QUERY PLAN
336
+ --------------------------------------------------------------------------------
337
+ Nested Loop
338
+ -> Limit
339
+ -> Seq Scan on run_values
340
+ -> Custom Scan (RuntimeAppend)
341
+ -> Index Only Scan using runtime_test_1_0_pkey on runtime_test_1_0 t1
342
+ Index Cond: (id = run_values.val)
343
+ -> Index Only Scan using runtime_test_1_1_pkey on runtime_test_1_1 t1
344
+ Index Cond: (id = run_values.val)
345
+ -> Index Only Scan using runtime_test_1_2_pkey on runtime_test_1_2 t1
346
+ Index Cond: (id = run_values.val)
347
+ -> Index Only Scan using runtime_test_1_3_pkey on runtime_test_1_3 t1
348
+ Index Cond: (id = run_values.val)
349
+ -> Index Only Scan using runtime_test_1_4_pkey on runtime_test_1_4 t1
350
+ Index Cond: (id = run_values.val)
351
+ -> Index Only Scan using runtime_test_1_5_pkey on runtime_test_1_5 t1
352
+ Index Cond: (id = run_values.val)
353
+ (16 rows)
354
+
355
+ select from test.runtime_test_1 as t1
356
+ join (select * from test.run_values limit 4) as t2 on t1.id = t2.val;
357
+ --
358
+ (4 rows)
359
+
360
+ /* RuntimeAppend (join, additional projections) */
361
+ select generate_series(1, 2) from test.runtime_test_1 as t1
362
+ join (select * from test.run_values limit 4) as t2 on t1.id = t2.val;
363
+ generate_series
364
+ -----------------
365
+ 1
366
+ 2
367
+ 1
368
+ 2
369
+ 1
370
+ 2
371
+ 1
372
+ 2
373
+ (8 rows)
374
+
288
375
DROP SCHEMA test CASCADE;
289
376
NOTICE: drop cascades to 30 other objects
290
377
DROP EXTENSION pg_pathman CASCADE;
0 commit comments