Skip to content

Commit 0247d43

Browse files
committed
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.
1 parent cc3f281 commit 0247d43

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,7 @@ select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
21422142
(13 rows)
21432143

21442144
savepoint s3;
2145-
update ft2 set c2 = -2 where c2 = 42; -- fail on remote side
2145+
update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side
21462146
ERROR: new row for relation "T 1" violates check constraint "c2positive"
21472147
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).
21482148
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = $2 WHERE ctid = $1

contrib/postgres_fdw/sql/postgres_fdw.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
337337
release savepoint s2;
338338
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
339339
savepoint s3;
340-
update ft2 set c2 = -2 where c2 = 42; -- fail on remote side
340+
update ft2 set c2 = -2 where c2 = 42 and c1 = 10; -- fail on remote side
341341
rollback to savepoint s3;
342342
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
343343
release savepoint s3;

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