Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf7951ee

Browse files
committed
Band-aid for regression test expected-results problem with timestamptz.
We probably need to tell the remote server to use specific timezone anddatestyle settings, and maybe other things. But for now let's just hackthe postgres_fdw regression test to not provoke failures when run innon-EST5EDT environments. Per buildfarm.
1 parent21734d2 commitf7951ee

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,10 +1983,10 @@ INSERT INTO ft1(c1, c2) VALUES(1111, -2); -- c2positive
19831983
ERROR: new row for relation "T 1" violates check constraint "c2positive"
19841984
DETAIL: Failing row contains (1111, -2, null, null, null, (^-^;), null, null).
19851985
CONTEXT: Remote SQL command: INSERT INTO "S 1"."T 1"("C 1", c2) VALUES ($1, $2)
1986-
UPDATE ft1 SET c2 = -c2 WHERE c1 = 1; -- c2positive
1986+
UPDATE ft1 SET c2 = -c2, c4 = null WHERE c1 = 1; -- c2positive
19871987
ERROR: new row for relation "T 1" violates check constraint "c2positive"
1988-
DETAIL: Failing row contains (1, -1, 00001_trig_update,1970-01-02 03:00:00-05, 1970-01-02 00:00:00, 1, 1 , foo).
1989-
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = $2 WHERE ctid = $1
1988+
DETAIL: Failing row contains (1, -1, 00001_trig_update,null, 1970-01-02 00:00:00, 1, 1 , foo).
1989+
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = $2, c4 = $3 WHERE ctid = $1
19901990
-- Test savepoint/rollback behavior
19911991
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
19921992
c2 | count
@@ -2142,10 +2142,10 @@ 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, c4 = null where c2 = 42; -- fail on remote side
21462146
ERROR: new row for relation "T 1" violates check constraint "c2positive"
2147-
DETAIL: Failing row contains (10, -2, 00010_trig_update_trig_update,1970-01-11 03:00:00-05, 1970-01-11 00:00:00, 0, 0 , foo).
2148-
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = $2 WHERE ctid = $1
2147+
DETAIL: Failing row contains (10, -2, 00010_trig_update_trig_update,null, 1970-01-11 00:00:00, 0, 0 , foo).
2148+
CONTEXT: Remote SQL command: UPDATE "S 1"."T 1" SET c2 = $2, c4 = $3 WHERE ctid = $1
21492149
rollback to savepoint s3;
21502150
select c2, count(*) from ft2 where c2 < 500 group by 1 order by 1;
21512151
c2 | count

‎contrib/postgres_fdw/sql/postgres_fdw.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ ALTER TABLE "S 1"."T 1" ADD CONSTRAINT c2positive CHECK (c2 >= 0);
316316

317317
INSERT INTO ft1(c1, c2)VALUES(11,12);-- duplicate key
318318
INSERT INTO ft1(c1, c2)VALUES(1111,-2);-- c2positive
319-
UPDATE ft1SET c2=-c2WHERE c1=1;-- c2positive
319+
UPDATE ft1SET c2=-c2, c4=nullWHERE c1=1;-- c2positive
320320

321321
-- Test savepoint/rollback behavior
322322
select c2,count(*)from ft2where c2<500group by1order by1;
@@ -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 ft2where c2<500group by1order by1;
339339
savepoint s3;
340-
update ft2set c2=-2where c2=42;-- fail on remote side
340+
update ft2set c2=-2, c4=nullwhere c2=42;-- fail on remote side
341341
rollback to savepoint s3;
342342
select c2,count(*)from ft2where c2<500group by1order by1;
343343
release savepoint s3;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp