diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/with.out | 18 | ||||
-rw-r--r-- | src/test/regress/sql/with.sql | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/test/regress/expected/with.out b/src/test/regress/expected/with.out index 69c56ce2077..3cf969d9382 100644 --- a/src/test/regress/expected/with.out +++ b/src/test/regress/expected/with.out @@ -654,6 +654,24 @@ select count(*) from tenk1 a -> CTE Scan on x (8 rows) +explain (costs off) +with x as materialized (insert into tenk1 default values returning unique1) +select count(*) from tenk1 a + where unique1 in (select * from x); + QUERY PLAN +------------------------------------------------------------ + Aggregate + CTE x + -> Insert on tenk1 + -> Result + -> Nested Loop + -> HashAggregate + Group Key: x.unique1 + -> CTE Scan on x + -> Index Only Scan using tenk1_unique1 on tenk1 a + Index Cond: (unique1 = x.unique1) +(10 rows) + -- SEARCH clause create temp table graph0( f int, t int, label text ); insert into graph0 values diff --git a/src/test/regress/sql/with.sql b/src/test/regress/sql/with.sql index 3ef98988663..ff68e21e2e6 100644 --- a/src/test/regress/sql/with.sql +++ b/src/test/regress/sql/with.sql @@ -354,6 +354,11 @@ with x as materialized (select unique1 from tenk1 b) select count(*) from tenk1 a where unique1 in (select * from x); +explain (costs off) +with x as materialized (insert into tenk1 default values returning unique1) +select count(*) from tenk1 a + where unique1 in (select * from x); + -- SEARCH clause create temp table graph0( f int, t int, label text ); |