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

Commit1822005

Browse files
committed
Fix platform dependant regression output triggered by69f4b9c.
Due to the changed costing in that commit hash-aggregates started tobe used, which results in big-endian vs. little-endian outputdifferences. Disable hash-aggs for those tests.Author: Andres Freund, with input from Tom LaneDiscussion:https://postgr.es/m/22891.1484791792@sss.pgh.pa.us
1 parentea15e18 commit1822005

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ SELECT few.id FROM few ORDER BY id, generate_series(1,3) DESC;
115115
(9 rows)
116116

117117
-- SRFs are computed after aggregation
118+
SET enable_hashagg TO 0; -- stable output order
118119
SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few WHERE few.id = 1 GROUP BY few.dataa;
119120
dataa | count | min | max | unnest
120121
-------+-------+-----+-----+--------
@@ -127,17 +128,18 @@ SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few
127128
SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few WHERE few.id = 1 GROUP BY few.dataa, unnest('{1,1,3}'::int[]);
128129
dataa | count | min | max | unnest
129130
-------+-------+-----+-----+--------
130-
a | 1 | 1 | 1 | 3
131131
a | 2 | 1 | 1 | 1
132+
a | 1 | 1 | 1 | 3
132133
(2 rows)
133134

134135
SELECT few.dataa, count(*), min(id), max(id), unnest('{1,1,3}'::int[]) FROM few WHERE few.id = 1 GROUP BY few.dataa, 5;
135136
dataa | count | min | max | unnest
136137
-------+-------+-----+-----+--------
137-
a | 1 | 1 | 1 | 3
138138
a | 2 | 1 | 1 | 1
139+
a | 1 | 1 | 1 | 3
139140
(2 rows)
140141

142+
RESET enable_hashagg;
141143
-- check HAVING works when GROUP BY does [not] reference SRF output
142144
SELECT dataa, generate_series(1,1), count(*) FROM few GROUP BY 1 HAVING count(*) > 1;
143145
dataa | generate_series | count

‎src/test/regress/sql/tsrf.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ SELECT few.id, generate_series(1,3) g FROM few ORDER BY id, generate_series(1,3)
3131
SELECTfew.idFROM fewORDER BY id, generate_series(1,3)DESC;
3232

3333
-- SRFs are computed after aggregation
34+
SET enable_hashagg TO0;-- stable output order
3435
SELECTfew.dataa,count(*),min(id),max(id), unnest('{1,1,3}'::int[])FROM fewWHEREfew.id=1GROUP BYfew.dataa;
3536
-- unless referenced in GROUP BY clause
3637
SELECTfew.dataa,count(*),min(id),max(id), unnest('{1,1,3}'::int[])FROM fewWHEREfew.id=1GROUP BYfew.dataa, unnest('{1,1,3}'::int[]);
3738
SELECTfew.dataa,count(*),min(id),max(id), unnest('{1,1,3}'::int[])FROM fewWHEREfew.id=1GROUP BYfew.dataa,5;
39+
RESET enable_hashagg;
3840

3941
-- check HAVING works when GROUP BY does [not] reference SRF output
4042
SELECT dataa, generate_series(1,1),count(*)FROM fewGROUP BY1HAVINGcount(*)>1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp