Commit 0247d43d authored by Tom Lane's avatar Tom Lane

Avoid row-processing-order dependency in postgres_fdw regression test.

A test intended to provoke an error on the remote side was coded in such
a way that multiple rows should be updated, so the output would vary
depending on which one was processed first.  Per buildfarm.
parent cc3f281f
...@@ -2142,7 +2142,7 @@ select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; ...@@ -2142,7 +2142,7 @@ select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
(13 rows) (13 rows)
savepoint s3; savepoint s3;
update ft2 set c2 = -2 where c2 = 42; -- fail on remote side update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side
ERROR: new row for relation "T 1" violates check constraint "c2positive" ERROR: new row for relation "T 1" violates check constraint "c2positive"
DETAIL: Failing row contains (10, -2, 00010_trig_update_trig_update, 1970-01-11 08:00:00+00, 1970-01-11 00:00:00, 0, 0 , foo). DETAIL: Failing row contains (10, -2, 00010_trig_update_trig_update, 1970-01-11 08:00:00+00, 1970-01-11 00:00:00, 0, 0 , foo).
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = $2 WHERE ctid = $1 CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = $2 WHERE ctid = $1
......
...@@ -337,7 +337,7 @@ select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; ...@@ -337,7 +337,7 @@ select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
release savepoint s2; release savepoint s2;
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
savepoint s3; savepoint s3;
update ft2 set c2 = -2 where c2 = 42; -- fail on remote side update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side
rollback to savepoint s3; rollback to savepoint s3;
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1; select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
release savepoint s3; release savepoint s3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment