summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2016-10-13 01:31:45 +0000
committerAndres Freund2016-10-13 01:31:45 +0000
commitccbb852cd6101e93976111676a90f1e5d9268951 (patch)
treea3d473c25715d1012161ea8ce0b554c6669bb3e8
parentb4fc645787cc7c614c0c97fc9fffacf2bdc6a388 (diff)
Fix further hash table order dependent tests.
Similar to 0137caf273, 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.
-rw-r--r--contrib/test_decoding/expected/ddl.out4
-rw-r--r--contrib/test_decoding/sql/ddl.sql4
-rw-r--r--src/pl/plpython/expected/plpython_spi.out4
-rw-r--r--src/pl/plpython/sql/plpython_spi.sql4
4 files changed, 8 insertions, 8 deletions
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index bd9b42f401..7fbeafdb39 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -274,9 +274,9 @@ INSERT INTO tr_etoomuch (id, data)
SELECT g.i, -g.i FROM generate_series(8000, 12000) g(i)
ON CONFLICT(id) DO UPDATE SET data = EXCLUDED.data;
SELECT substring(data, 1, 29), count(*)
-FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1')
+FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1') WITH ORDINALITY
GROUP BY 1
-ORDER BY min(location - '0/0');
+ORDER BY min(ordinality);
substring | count
-------------------------------+-------
BEGIN | 1
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index e99b2d37d9..89b8b8f780 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -146,9 +146,9 @@ SELECT g.i, -g.i FROM generate_series(8000, 12000) g(i)
ON CONFLICT(id) DO UPDATE SET data = EXCLUDED.data;
SELECT substring(data, 1, 29), count(*)
-FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1')
+FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1') WITH ORDINALITY
GROUP BY 1
-ORDER BY min(location - '0/0');
+ORDER BY min(ordinality);
/*
* check whether we decode subtransactions correctly in relation with each
diff --git a/src/pl/plpython/expected/plpython_spi.out b/src/pl/plpython/expected/plpython_spi.out
index dbde36f841..0d78ca1de4 100644
--- a/src/pl/plpython/expected/plpython_spi.out
+++ b/src/pl/plpython/expected/plpython_spi.out
@@ -220,8 +220,8 @@ SELECT result_len_test($$UPDATE foo3 SET b= '' WHERE a = 2$$);
CREATE FUNCTION result_subscript_test() RETURNS void
AS $$
-result = plpy.execute("SELECT 1 AS c UNION SELECT 2 "
- "UNION SELECT 3 UNION SELECT 4")
+result = plpy.execute("SELECT 1 AS c UNION ALL SELECT 2 "
+ "UNION ALL SELECT 3 UNION ALL SELECT 4")
plpy.info(result[1]['c'])
plpy.info(result[-1]['c'])
diff --git a/src/pl/plpython/sql/plpython_spi.sql b/src/pl/plpython/sql/plpython_spi.sql
index 87170609da..7427de824b 100644
--- a/src/pl/plpython/sql/plpython_spi.sql
+++ b/src/pl/plpython/sql/plpython_spi.sql
@@ -135,8 +135,8 @@ SELECT result_len_test($$UPDATE foo3 SET b= '' WHERE a = 2$$);
CREATE FUNCTION result_subscript_test() RETURNS void
AS $$
-result = plpy.execute("SELECT 1 AS c UNION SELECT 2 "
- "UNION SELECT 3 UNION SELECT 4")
+result = plpy.execute("SELECT 1 AS c UNION ALL SELECT 2 "
+ "UNION ALL SELECT 3 UNION ALL SELECT 4")
plpy.info(result[1]['c'])
plpy.info(result[-1]['c'])