Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb403ea4

Browse files
committed
Make some subquery-using test cases a bit more robust.
These test cases could be adversely affected by an upcoming changeto allow pullup of FROM-less subqueries. Tweak them to ensure thatthey'll continue to test what they did before.Discussion:https://postgr.es/m/5395.1539275668@sss.pgh.pa.us
1 parent7d4a10e commitb403ea4

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

‎src/test/regress/expected/select.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,19 +438,19 @@ SELECT p.name, p.age FROM person* p ORDER BY age using >, name;
438438
--
439439
-- Test some cases involving whole-row Var referencing a subquery
440440
--
441-
select foo from (select 1) as foo;
441+
select foo from (select 1 offset 0) as foo;
442442
foo
443443
-----
444444
(1)
445445
(1 row)
446446

447-
select foo from (select null) as foo;
447+
select foo from (select null offset 0) as foo;
448448
foo
449449
-----
450450
()
451451
(1 row)
452452

453-
select foo from (select 'xyzzy',1,null) as foo;
453+
select foo from (select 'xyzzy',1,null offset 0) as foo;
454454
foo
455455
------------
456456
(xyzzy,1,)

‎src/test/regress/expected/select_parallel.out

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,22 +1116,21 @@ EXECUTE pstmt('1', make_some_array(1,2));
11161116

11171117
DEALLOCATE pstmt;
11181118
-- test interaction between subquery and partial_paths
1119-
SET LOCAL min_parallel_table_scan_size TO 0;
11201119
CREATE VIEW tenk1_vw_sec WITH (security_barrier) AS SELECT * FROM tenk1;
11211120
EXPLAIN (COSTS OFF)
1122-
SELECT 1 FROM tenk1_vw_sec WHERE EXISTS (SELECT 1 WHERE unique1 = 0);
1121+
SELECT 1 FROM tenk1_vw_sec
1122+
WHERE (SELECT sum(f1) FROM int4_tbl WHERE f1 < unique1) < 100;
11231123
QUERY PLAN
11241124
-------------------------------------------------------------------
11251125
Subquery Scan on tenk1_vw_sec
1126-
Filter: (alternatives:SubPlan 1 or hashed SubPlan 2)
1126+
Filter: ((SubPlan 1) < 100)
11271127
-> Gather
11281128
Workers Planned: 4
11291129
-> Parallel Index Only Scan using tenk1_unique1 on tenk1
11301130
SubPlan 1
1131-
-> Result
1132-
One-Time Filter: (tenk1_vw_sec.unique1 = 0)
1133-
SubPlan 2
1134-
-> Result
1135-
(10 rows)
1131+
-> Aggregate
1132+
-> Seq Scan on int4_tbl
1133+
Filter: (f1 < tenk1_vw_sec.unique1)
1134+
(9 rows)
11361135

11371136
rollback;

‎src/test/regress/sql/select.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ SELECT p.name, p.age FROM person* p ORDER BY age using >, name;
116116
--
117117
-- Test some cases involving whole-row Var referencing a subquery
118118
--
119-
select foofrom (select1)as foo;
120-
select foofrom (selectnull)as foo;
121-
select foofrom (select'xyzzy',1,null)as foo;
119+
select foofrom (select1 offset0)as foo;
120+
select foofrom (selectnull offset0)as foo;
121+
select foofrom (select'xyzzy',1,null offset0)as foo;
122122

123123
--
124124
-- Test VALUES lists

‎src/test/regress/sql/select_parallel.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ EXECUTE pstmt('1', make_some_array(1,2));
427427
DEALLOCATE pstmt;
428428

429429
-- test interaction between subquery and partial_paths
430-
SET LOCAL min_parallel_table_scan_size TO0;
431430
CREATEVIEWtenk1_vw_sec WITH (security_barrier)ASSELECT*FROM tenk1;
432431
EXPLAIN (COSTS OFF)
433-
SELECT1FROM tenk1_vw_secWHERE EXISTS (SELECT1WHERE unique1=0);
432+
SELECT1FROM tenk1_vw_sec
433+
WHERE (SELECTsum(f1)FROM int4_tblWHERE f1< unique1)<100;
434434

435435
rollback;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp