Fix further hash table order dependent tests.
authorAndres Freund <[email protected]>
Thu, 13 Oct 2016 01:31:45 +0000 (18:31 -0700)
committerAndres Freund <[email protected]>
Thu, 13 Oct 2016 01:31:45 +0000 (18:31 -0700)
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.

contrib/test_decoding/expected/ddl.out
contrib/test_decoding/sql/ddl.sql
src/pl/plpython/expected/plpython_spi.out
src/pl/plpython/sql/plpython_spi.sql

index bd9b42f40106d8e50dcc21beeaab8426a41f6ed2..7fbeafdb392e96d4ac292bedef86673800bacce6 100644 (file)
@@ -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
index e99b2d37d9eb3ff3e59299f958188e4cd5661a3c..89b8b8f7800289ba471d97e561a68abd71332354 100644 (file)
@@ -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
index dbde36f8412e76bbdfce196f0dd06a73036dd6a2..0d78ca1de481d103b1590079304e690dca292ba6 100644 (file)
@@ -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'])
index 87170609da2114e44fde426241a694e08a62d485..7427de824b3c88a065a11c392ccde9499ccd7a95 100644 (file)
@@ -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'])