Skip to content

Commit ccbb852

Browse files
committed
Fix further hash table order dependent tests.
Similar to 0137caf, this makes contrib and pl tests less dependant on hash-table order. After this commit, at least some order affecting changes to execGrouping.c don't result in regression test changes anymore.
1 parent b4fc645 commit ccbb852

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

contrib/test_decoding/expected/ddl.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ INSERT INTO tr_etoomuch (id, data)
274274
SELECT g.i, -g.i FROM generate_series(8000, 12000) g(i)
275275
ON CONFLICT(id) DO UPDATE SET data = EXCLUDED.data;
276276
SELECT substring(data, 1, 29), count(*)
277-
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1')
277+
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1') WITH ORDINALITY
278278
GROUP BY 1
279-
ORDER BY min(location - '0/0');
279+
ORDER BY min(ordinality);
280280
substring | count
281281
-------------------------------+-------
282282
BEGIN | 1

contrib/test_decoding/sql/ddl.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ SELECT g.i, -g.i FROM generate_series(8000, 12000) g(i)
146146
ON CONFLICT(id) DO UPDATE SET data = EXCLUDED.data;
147147

148148
SELECT substring(data, 1, 29), count(*)
149-
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1')
149+
FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1') WITH ORDINALITY
150150
GROUP BY 1
151-
ORDER BY min(location - '0/0');
151+
ORDER BY min(ordinality);
152152

153153
/*
154154
* check whether we decode subtransactions correctly in relation with each

src/pl/plpython/expected/plpython_spi.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ SELECT result_len_test($$UPDATE foo3 SET b= '' WHERE a = 2$$);
220220

221221
CREATE FUNCTION result_subscript_test() RETURNS void
222222
AS $$
223-
result = plpy.execute("SELECT 1 AS c UNION SELECT 2 "
224-
"UNION SELECT 3 UNION SELECT 4")
223+
result = plpy.execute("SELECT 1 AS c UNION ALL SELECT 2 "
224+
"UNION ALL SELECT 3 UNION ALL SELECT 4")
225225

226226
plpy.info(result[1]['c'])
227227
plpy.info(result[-1]['c'])

src/pl/plpython/sql/plpython_spi.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ SELECT result_len_test($$UPDATE foo3 SET b= '' WHERE a = 2$$);
135135

136136
CREATE FUNCTION result_subscript_test() RETURNS void
137137
AS $$
138-
result = plpy.execute("SELECT 1 AS c UNION SELECT 2 "
139-
"UNION SELECT 3 UNION SELECT 4")
138+
result = plpy.execute("SELECT 1 AS c UNION ALL SELECT 2 "
139+
"UNION ALL SELECT 3 UNION ALL SELECT 4")
140140

141141
plpy.info(result[1]['c'])
142142
plpy.info(result[-1]['c'])

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy