You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: expected/pathman_basic.out
+29-1Lines changed: 29 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2001,7 +2001,35 @@ EXPLAIN (COSTS OFF) SELECT * FROM test.index_on_childs WHERE c1 > 100 AND c1 < 2
2001
2001
Filter: (c1 < 2500)
2002
2002
(12 rows)
2003
2003
2004
+
/* Test recursive CTE */
2005
+
create table test.recursive_cte_test_tbl(id int not null, name text not null);
2006
+
select * from create_hash_partitions('test.recursive_cte_test_tbl', 'id', 2);
2007
+
create_hash_partitions
2008
+
------------------------
2009
+
2
2010
+
(1 row)
2011
+
2012
+
insert into test.recursive_cte_test_tbl (id, name) select id, 'name'||id from generate_series(1,100) f(id);
2013
+
insert into test.recursive_cte_test_tbl (id, name) select id, 'name'||(id + 1) from generate_series(1,100) f(id);
2014
+
insert into test.recursive_cte_test_tbl (id, name) select id, 'name'||(id + 2) from generate_series(1,100) f(id);
2015
+
select * from test.recursive_cte_test_tbl where id = 5;
2016
+
id | name
2017
+
----+-------
2018
+
5 | name5
2019
+
5 | name6
2020
+
5 | name7
2021
+
(3 rows)
2022
+
2023
+
with recursive test as (select min(name) as name from test.recursive_cte_test_tbl where id = 5 union all select (select min(name) from test.recursive_cte_test_tbl where id = 5 and name > test.name) from test where name is not null) select * from test;