From b2b2491b06074e68fc7c96148cb0fdf0c8eb0469 Mon Sep 17 00:00:00 2001
From: Noah Misch <noah@leadboat.com>
Date: Sun, 23 Mar 2014 03:48:17 -0400
Subject: [PATCH] Don't test xmin/xmax columns of a postgres_fdw foreign table.

Their values are unspecified and system-dependent.

Per buildfarm member kouprey.
---
 contrib/postgres_fdw/expected/postgres_fdw.out | 10 +++++-----
 contrib/postgres_fdw/sql/postgres_fdw.sql      |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out
index 671c329c920..eeb0b0f291c 100644
--- a/contrib/postgres_fdw/expected/postgres_fdw.out
+++ b/contrib/postgres_fdw/expected/postgres_fdw.out
@@ -2804,14 +2804,14 @@ NOTICE:  trig_row_before(23, skidoo) BEFORE ROW UPDATE ON rem1
 NOTICE:  OLD: (12,"test triggered !"),NEW: (12,testo)
 NOTICE:  trig_row_after(23, skidoo) AFTER ROW UPDATE ON rem1
 NOTICE:  OLD: (12,"test triggered !"),NEW: (12,"testo triggered !")
--- Test returning system attributes
-INSERT INTO rem1(f2) VALUES ('test') RETURNING ctid, xmin, xmax;
+-- Test returning a system attribute
+INSERT INTO rem1(f2) VALUES ('test') RETURNING ctid;
 NOTICE:  trig_row_before(23, skidoo) BEFORE ROW INSERT ON rem1
 NOTICE:  NEW: (13,test)
 NOTICE:  trig_row_after(23, skidoo) AFTER ROW INSERT ON rem1
 NOTICE:  NEW: (13,"test triggered !")
-  ctid  | xmin |    xmax    
---------+------+------------
- (0,27) |  180 | 4294967295
+  ctid  
+--------
+ (0,27)
 (1 row)
 
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
index d47ceca3c11..e11f7d99602 100644
--- a/contrib/postgres_fdw/sql/postgres_fdw.sql
+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql
@@ -604,5 +604,5 @@ FOR EACH ROW EXECUTE PROCEDURE trig_row_before_insupdate();
 INSERT INTO rem1(f2) VALUES ('test');
 UPDATE rem1 SET f2 = 'testo';
 
--- Test returning system attributes
-INSERT INTO rem1(f2) VALUES ('test') RETURNING ctid, xmin, xmax;
+-- Test returning a system attribute
+INSERT INTO rem1(f2) VALUES ('test') RETURNING ctid;
-- 
GitLab