diff options
Diffstat (limited to 'src/test/regress/expected/subselect.out')
-rw-r--r-- | src/test/regress/expected/subselect.out | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/src/test/regress/expected/subselect.out b/src/test/regress/expected/subselect.out index 47b2af7b2e1..cf6b32d1173 100644 --- a/src/test/regress/expected/subselect.out +++ b/src/test/regress/expected/subselect.out @@ -205,11 +205,11 @@ SELECT f1 AS "Correlated Field" -- Check ROWCOMPARE cases, both correlated and not EXPLAIN (VERBOSE, COSTS OFF) SELECT ROW(1, 2) = (SELECT f1, f2) AS eq FROM SUBSELECT_TBL; - QUERY PLAN ------------------------------------------------------------------ + QUERY PLAN +--------------------------------------------------------------------------------------- Seq Scan on public.subselect_tbl - Output: (((1 = (SubPlan 1).col1) AND (2 = (SubPlan 1).col2))) - SubPlan 1 + Output: (((1 = (SubPlan rowcompare_1).col1) AND (2 = (SubPlan rowcompare_1).col2))) + SubPlan rowcompare_1 -> Result Output: subselect_tbl.f1, subselect_tbl.f2 (5 rows) @@ -229,11 +229,11 @@ SELECT ROW(1, 2) = (SELECT f1, f2) AS eq FROM SUBSELECT_TBL; EXPLAIN (VERBOSE, COSTS OFF) SELECT ROW(1, 2) = (SELECT 3, 4) AS eq FROM SUBSELECT_TBL; - QUERY PLAN ------------------------------------------------------------------ + QUERY PLAN +--------------------------------------------------------------------------------------- Seq Scan on public.subselect_tbl - Output: ((1 = (InitPlan 1).col1) AND (2 = (InitPlan 1).col2)) - InitPlan 1 + Output: ((1 = (InitPlan rowcompare_1).col1) AND (2 = (InitPlan rowcompare_1).col2)) + InitPlan rowcompare_1 -> Result Output: 3, 4 (5 rows) @@ -375,18 +375,18 @@ explain (verbose, costs off) select '42' union all select 43; -- check materialization of an initplan reference (bug #14524) explain (verbose, costs off) select 1 = all (select (select 1)); - QUERY PLAN -------------------------------------------- + QUERY PLAN +------------------------------------------------ Result - Output: (ALL (1 = (SubPlan 2).col1)) - SubPlan 2 + Output: (ALL (1 = (SubPlan all_1).col1)) + SubPlan all_1 -> Materialize - Output: ((InitPlan 1).col1) - InitPlan 1 + Output: ((InitPlan expr_1).col1) + InitPlan expr_1 -> Result Output: 1 -> Result - Output: (InitPlan 1).col1 + Output: (InitPlan expr_1).col1 (10 rows) select 1 = all (select (select 1)); @@ -428,8 +428,8 @@ select * from int4_tbl o where exists QUERY PLAN -------------------------------------- Seq Scan on int4_tbl o - Filter: EXISTS(SubPlan 1) - SubPlan 1 + Filter: EXISTS(SubPlan exists_1) + SubPlan exists_1 -> Limit -> Seq Scan on int4_tbl i Filter: (f1 = o.f1) @@ -988,7 +988,7 @@ select (1 = any(array_agg(f1))) = any (select false) from int4_tbl; ---------------------------- Aggregate -> Seq Scan on int4_tbl - SubPlan 1 + SubPlan any_1 -> Result (4 rows) @@ -1116,11 +1116,11 @@ select * from outer_text where (f1, f2) not in (select * from inner_text); -- explain (verbose, costs off) select 'foo'::text in (select 'bar'::name union all select 'bar'::name); - QUERY PLAN ---------------------------------------------------------- + QUERY PLAN +------------------------------------------------------------- Result - Output: (ANY ('foo'::text = (hashed SubPlan 1).col1)) - SubPlan 1 + Output: (ANY ('foo'::text = (hashed SubPlan any_1).col1)) + SubPlan any_1 -> Append -> Result Output: 'bar'::name @@ -1140,11 +1140,11 @@ select 'foo'::text in (select 'bar'::name union all select 'bar'::name); -- explain (verbose, costs off) select row(row(row(1))) = any (select row(row(1))); - QUERY PLAN --------------------------------------------------------- + QUERY PLAN +------------------------------------------------------------ Result - Output: (ANY ('("(1)")'::record = (SubPlan 1).col1)) - SubPlan 1 + Output: (ANY ('("(1)")'::record = (SubPlan any_1).col1)) + SubPlan any_1 -> Materialize Output: '("(1)")'::record -> Result @@ -1184,11 +1184,11 @@ language sql as 'select $1::text = $2'; create operator = (procedure=bogus_int8_text_eq, leftarg=int8, rightarg=text); explain (costs off) select * from int8_tbl where q1 in (select c1 from inner_text); - QUERY PLAN --------------------------------------------------------- + QUERY PLAN +------------------------------------------------------------ Seq Scan on int8_tbl - Filter: (ANY ((q1)::text = (hashed SubPlan 1).col1)) - SubPlan 1 + Filter: (ANY ((q1)::text = (hashed SubPlan any_1).col1)) + SubPlan any_1 -> Seq Scan on inner_text (4 rows) @@ -1205,11 +1205,11 @@ create or replace function bogus_int8_text_eq(int8, text) returns boolean language sql as 'select $1::text = $2 and $1::text = $2'; explain (costs off) select * from int8_tbl where q1 in (select c1 from inner_text); - QUERY PLAN ------------------------------------------------------------------------------------------------------ + QUERY PLAN +------------------------------------------------------------------------------------------------------------- Seq Scan on int8_tbl - Filter: (ANY (((q1)::text = (hashed SubPlan 1).col1) AND ((q1)::text = (hashed SubPlan 1).col1))) - SubPlan 1 + Filter: (ANY (((q1)::text = (hashed SubPlan any_1).col1) AND ((q1)::text = (hashed SubPlan any_1).col1))) + SubPlan any_1 -> Seq Scan on inner_text (4 rows) @@ -1226,11 +1226,11 @@ create or replace function bogus_int8_text_eq(int8, text) returns boolean language sql as 'select $2 = $1::text'; explain (costs off) select * from int8_tbl where q1 in (select c1 from inner_text); - QUERY PLAN -------------------------------------------------- + QUERY PLAN +----------------------------------------------------- Seq Scan on int8_tbl - Filter: (ANY ((SubPlan 1).col1 = (q1)::text)) - SubPlan 1 + Filter: (ANY ((SubPlan any_1).col1 = (q1)::text)) + SubPlan any_1 -> Materialize -> Seq Scan on inner_text (5 rows) @@ -1249,12 +1249,12 @@ rollback; -- to get rid of the bogus operator explain (costs off) select count(*) from tenk1 t where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0); - QUERY PLAN --------------------------------------------------------------------------- + QUERY PLAN +--------------------------------------------------------------------------------- Aggregate -> Seq Scan on tenk1 t - Filter: ((ANY (unique2 = (hashed SubPlan 2).col1)) OR (ten < 0)) - SubPlan 2 + Filter: ((ANY (unique2 = (hashed SubPlan exists_2).col1)) OR (ten < 0)) + SubPlan exists_2 -> Index Only Scan using tenk1_unique1 on tenk1 k (5 rows) @@ -1274,10 +1274,10 @@ where (exists(select 1 from tenk1 k where k.unique1 = t.unique2) or ten < 0) Aggregate -> Bitmap Heap Scan on tenk1 t Recheck Cond: (thousand = 1) - Filter: (EXISTS(SubPlan 1) OR (ten < 0)) + Filter: (EXISTS(SubPlan exists_1) OR (ten < 0)) -> Bitmap Index Scan on tenk1_thous_tenthous Index Cond: (thousand = 1) - SubPlan 1 + SubPlan exists_1 -> Index Only Scan using tenk1_unique1 on tenk1 k Index Cond: (unique1 = t.unique2) (9 rows) @@ -1299,20 +1299,20 @@ analyze exists_tbl; explain (costs off) select * from exists_tbl t1 where (exists(select 1 from exists_tbl t2 where t1.c1 = t2.c2) or c3 < 0); - QUERY PLAN --------------------------------------------------------------------- + QUERY PLAN +--------------------------------------------------------------------------- Append -> Seq Scan on exists_tbl_null t1_1 - Filter: (EXISTS(SubPlan 1) OR (c3 < 0)) - SubPlan 1 + Filter: (EXISTS(SubPlan exists_1) OR (c3 < 0)) + SubPlan exists_1 -> Append -> Seq Scan on exists_tbl_null t2_1 Filter: (t1_1.c1 = c2) -> Seq Scan on exists_tbl_def t2_2 Filter: (t1_1.c1 = c2) -> Seq Scan on exists_tbl_def t1_2 - Filter: ((ANY (c1 = (hashed SubPlan 2).col1)) OR (c3 < 0)) - SubPlan 2 + Filter: ((ANY (c1 = (hashed SubPlan exists_2).col1)) OR (c3 < 0)) + SubPlan exists_2 -> Append -> Seq Scan on exists_tbl_null t2_4 -> Seq Scan on exists_tbl_def t2_5 @@ -1348,14 +1348,14 @@ where a.thousand = b.thousand explain (verbose, costs off) select x, x from (select (select now()) as x from (values(1),(2)) v(y)) ss; - QUERY PLAN ------------------------------------------------- + QUERY PLAN +---------------------------------------------------------- Values Scan on "*VALUES*" - Output: (InitPlan 1).col1, (InitPlan 2).col1 - InitPlan 1 + Output: (InitPlan expr_1).col1, (InitPlan expr_2).col1 + InitPlan expr_1 -> Result Output: now() - InitPlan 2 + InitPlan expr_2 -> Result Output: now() (8 rows) @@ -1363,13 +1363,13 @@ explain (verbose, costs off) explain (verbose, costs off) select x, x from (select (select random()) as x from (values(1),(2)) v(y)) ss; - QUERY PLAN ------------------------------------ + QUERY PLAN +---------------------------------------- Subquery Scan on ss Output: ss.x, ss.x -> Values Scan on "*VALUES*" - Output: (InitPlan 1).col1 - InitPlan 1 + Output: (InitPlan expr_1).col1 + InitPlan expr_1 -> Result Output: random() (7 rows) @@ -1380,12 +1380,12 @@ explain (verbose, costs off) QUERY PLAN ---------------------------------------------------------------------- Values Scan on "*VALUES*" - Output: (SubPlan 1), (SubPlan 2) - SubPlan 1 + Output: (SubPlan expr_1), (SubPlan expr_2) + SubPlan expr_1 -> Result Output: now() One-Time Filter: ("*VALUES*".column1 = "*VALUES*".column1) - SubPlan 2 + SubPlan expr_2 -> Result Output: now() One-Time Filter: ("*VALUES*".column1 = "*VALUES*".column1) @@ -1399,8 +1399,8 @@ explain (verbose, costs off) Subquery Scan on ss Output: ss.x, ss.x -> Values Scan on "*VALUES*" - Output: (SubPlan 1) - SubPlan 1 + Output: (SubPlan expr_1) + SubPlan expr_1 -> Result Output: random() One-Time Filter: ("*VALUES*".column1 = "*VALUES*".column1) @@ -1420,16 +1420,16 @@ where o.ten = 0; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate - Output: sum((((ANY (i.ten = (hashed SubPlan 1).col1))))::integer) + Output: sum((((ANY (i.ten = (hashed SubPlan any_1).col1))))::integer) -> Nested Loop - Output: ((ANY (i.ten = (hashed SubPlan 1).col1))) + Output: ((ANY (i.ten = (hashed SubPlan any_1).col1))) -> Seq Scan on public.onek o Output: o.unique1, o.unique2, o.two, o.four, o.ten, o.twenty, o.hundred, o.thousand, o.twothousand, o.fivethous, o.tenthous, o.odd, o.even, o.stringu1, o.stringu2, o.string4 Filter: (o.ten = 0) -> Index Scan using onek_unique1 on public.onek i - Output: (ANY (i.ten = (hashed SubPlan 1).col1)), random() + Output: (ANY (i.ten = (hashed SubPlan any_1).col1)), random() Index Cond: (i.unique1 = o.unique1) - SubPlan 1 + SubPlan any_1 -> Seq Scan on public.int4_tbl Output: int4_tbl.f1 Filter: (int4_tbl.f1 <= o.hundred) @@ -1638,7 +1638,7 @@ select * from ---------------------------------------- Values Scan on "*VALUES*" Output: "*VALUES*".column1 - SubPlan 1 + SubPlan any_1 -> Values Scan on "*VALUES*_1" Output: "*VALUES*_1".column1 (5 rows) @@ -1665,12 +1665,12 @@ select * from int4_tbl where --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Nested Loop Semi Join Output: int4_tbl.f1 - Join Filter: (CASE WHEN (ANY (int4_tbl.f1 = (hashed SubPlan 1).col1)) THEN int4_tbl.f1 ELSE NULL::integer END = b.ten) + Join Filter: (CASE WHEN (ANY (int4_tbl.f1 = (hashed SubPlan any_1).col1)) THEN int4_tbl.f1 ELSE NULL::integer END = b.ten) -> Seq Scan on public.int4_tbl Output: int4_tbl.f1 -> Seq Scan on public.tenk1 b Output: b.unique1, b.unique2, b.two, b.four, b.ten, b.twenty, b.hundred, b.thousand, b.twothousand, b.fivethous, b.tenthous, b.odd, b.even, b.stringu1, b.stringu2, b.string4 - SubPlan 1 + SubPlan any_1 -> Index Only Scan using tenk1_unique1 on public.tenk1 a Output: a.unique1 (10 rows) @@ -2798,14 +2798,14 @@ select * from tenk1 A where exists (select 1 from tenk2 B where A.hundred in (select C.hundred FROM tenk2 C WHERE c.odd = b.odd)); - QUERY PLAN ------------------------------------------------------ + QUERY PLAN +--------------------------------------------------------- Nested Loop Semi Join - Join Filter: (ANY (a.hundred = (SubPlan 1).col1)) + Join Filter: (ANY (a.hundred = (SubPlan any_1).col1)) -> Seq Scan on tenk1 a -> Materialize -> Seq Scan on tenk2 b - SubPlan 1 + SubPlan any_1 -> Seq Scan on tenk2 c Filter: (odd = b.odd) (8 rows) @@ -2815,14 +2815,14 @@ WHERE c.odd = b.odd)); explain (costs off) SELECT * FROM tenk1 A LEFT JOIN tenk2 B ON A.hundred in (SELECT c.hundred FROM tenk2 C WHERE c.odd = b.odd); - QUERY PLAN ------------------------------------------------------ + QUERY PLAN +--------------------------------------------------------- Nested Loop Left Join - Join Filter: (ANY (a.hundred = (SubPlan 1).col1)) + Join Filter: (ANY (a.hundred = (SubPlan any_1).col1)) -> Seq Scan on tenk1 a -> Materialize -> Seq Scan on tenk2 b - SubPlan 1 + SubPlan any_1 -> Seq Scan on tenk2 c Filter: (odd = b.odd) (8 rows) @@ -2832,14 +2832,14 @@ ON A.hundred in (SELECT c.hundred FROM tenk2 C WHERE c.odd = b.odd); explain (costs off) SELECT * FROM tenk1 A LEFT JOIN tenk2 B ON B.hundred in (SELECT c.hundred FROM tenk2 C WHERE c.odd = a.odd); - QUERY PLAN ------------------------------------------------------ + QUERY PLAN +--------------------------------------------------------- Nested Loop Left Join - Join Filter: (ANY (b.hundred = (SubPlan 1).col1)) + Join Filter: (ANY (b.hundred = (SubPlan any_1).col1)) -> Seq Scan on tenk1 a -> Materialize -> Seq Scan on tenk2 b - SubPlan 1 + SubPlan any_1 -> Seq Scan on tenk2 c Filter: (odd = a.odd) (8 rows) @@ -2901,7 +2901,7 @@ ON B.hundred in (SELECT min(c.hundred) FROM tenk2 C WHERE c.odd = b.odd); Filter: (b.hundred = unnamed_subquery.min) -> Result Replaces: MinMaxAggregate - InitPlan 1 + InitPlan minmax_1 -> Limit -> Index Scan using tenk2_hundred on tenk2 c Index Cond: (hundred IS NOT NULL) @@ -3142,7 +3142,7 @@ WHERE unique1 IN (VALUES (0), ((2 IN (SELECT unique2 FROM onek c -> Seq Scan on onek t -> Values Scan on "*VALUES*" Filter: (t.unique1 = column1) - SubPlan 1 + SubPlan any_1 -> Index Only Scan using onek_unique2 on onek c Index Cond: (unique2 = t.unique1) (7 rows) @@ -3158,7 +3158,7 @@ WHERE unique1 IN (VALUES (0), ((2 IN (SELECT unique2 FROM onek c -> Sort Sort Key: "*VALUES*".column1 -> Values Scan on "*VALUES*" - SubPlan 1 + SubPlan any_1 -> Index Only Scan using onek_unique2 on onek c Filter: ((unique2)::double precision = ANY ('{0.479425538604203,2}'::double precision[])) -> Index Scan using onek_unique1 on onek t @@ -3177,7 +3177,7 @@ SELECT ten FROM onek t WHERE unique1 IN (VALUES (0), ((2 IN -> Sort Sort Key: "*VALUES*".column1 -> Values Scan on "*VALUES*" - SubPlan 1 + SubPlan any_1 -> Result -> Index Scan using onek_unique1 on onek t Index Cond: (unique1 = "*VALUES*".column1) |