summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael P2011-04-11 23:58:28 +0000
committerPavan Deolasee2011-05-24 10:31:10 +0000
commit83fa5f092a16a54d3981acc6b9c487d4473d97dc (patch)
tree6352c3cb9a4a75a83efbc87dfee1bcf1b04fa6d6
parentf400f82341a28b9bf8266ad829650b922a9df85d (diff)
Fix for regression output and SQL files
It wasn't taken into account that some output files change depending on the system regression is launched.
-rw-r--r--src/test/regress/expected/copy_1.out99
-rw-r--r--src/test/regress/input/create_misc.source (renamed from src/test/regress/sql/create_misc.sql)2
-rw-r--r--src/test/regress/output/copy_1.source1
-rw-r--r--src/test/regress/output/create_misc_1.source (renamed from src/test/regress/expected/create_misc_1.out)2
-rw-r--r--src/test/regress/output/misc_1.source (renamed from src/test/regress/expected/misc_1.out)10
5 files changed, 7 insertions, 107 deletions
diff --git a/src/test/regress/expected/copy_1.out b/src/test/regress/expected/copy_1.out
deleted file mode 100644
index 80a0ea4dcf..0000000000
--- a/src/test/regress/expected/copy_1.out
+++ /dev/null
@@ -1,99 +0,0 @@
---
--- COPY
---
--- CLASS POPULATION
--- (any resemblance to real life is purely coincidental)
---
-COPY aggtest FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/agg.data';
-COPY onek FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/onek.data';
-COPY onek TO '/home/abbas/pgxc/postgres-xc/src/test/regress/results/onek.data';
-DELETE FROM onek;
-COPY onek FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/results/onek.data';
-COPY tenk1 FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/tenk.data';
-COPY slow_emp4000 FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/rect.data';
-COPY person FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/person.data';
-COPY emp FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/emp.data';
-COPY student FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/student.data';
-COPY stud_emp FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/stud_emp.data';
-COPY road FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/streets.data';
-COPY real_city FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/real_city.data';
-COPY hash_i4_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/hash.data';
-COPY hash_name_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/hash.data';
-COPY hash_txt_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/hash.data';
-COPY hash_f8_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/hash.data';
-COPY test_tsvector FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/tsearch.data';
--- the data in this file has a lot of duplicates in the index key
--- fields, leading to long bucket chains and lots of table expansion.
--- this is therefore a stress test of the bucket overflow code (unlike
--- the data in hash.data, which has unique index keys).
---
--- COPY hash_ovfl_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/hashovfl.data';
-COPY bt_i4_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/desc.data';
-COPY bt_name_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/hash.data';
-COPY bt_txt_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/desc.data';
-COPY bt_f8_heap FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/hash.data';
-COPY array_op_test FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/array.data';
-COPY array_index_op_test FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/array.data';
---- test copying in CSV mode with various styles
---- of embedded line ending characters
-create temp table copytest (
- style text,
- test text,
- filler int);
-ERROR: PG-XC does not yet support temporary tables
-insert into copytest values('DOS',E'abc\r\ndef',1);
-ERROR: relation "copytest" does not exist
-LINE 1: insert into copytest values('DOS',E'abc\r\ndef',1);
- ^
-insert into copytest values('Unix',E'abc\ndef',2);
-ERROR: relation "copytest" does not exist
-LINE 1: insert into copytest values('Unix',E'abc\ndef',2);
- ^
-insert into copytest values('Mac',E'abc\rdef',3);
-ERROR: relation "copytest" does not exist
-LINE 1: insert into copytest values('Mac',E'abc\rdef',3);
- ^
-insert into copytest values(E'esc\\ape',E'a\\r\\\r\\\n\\nb',4);
-ERROR: relation "copytest" does not exist
-LINE 1: insert into copytest values(E'esc\\ape',E'a\\r\\\r\\\n\\nb',...
- ^
-copy copytest to '/home/abbas/pgxc/postgres-xc/src/test/regress/results/copytest.csv' csv;
-ERROR: relation "copytest" does not exist
-create temp table copytest2 (like copytest);
-ERROR: relation "copytest" does not exist
-LINE 1: create temp table copytest2 (like copytest);
- ^
-copy copytest2 from '/home/abbas/pgxc/postgres-xc/src/test/regress/results/copytest.csv' csv;
-ERROR: relation "copytest2" does not exist
-select * from copytest except select * from copytest2;
-ERROR: relation "copytest" does not exist
-LINE 1: select * from copytest except select * from copytest2;
- ^
-truncate copytest2;
-ERROR: relation "copytest2" does not exist
---- same test but with an escape char different from quote char
-copy copytest to '/home/abbas/pgxc/postgres-xc/src/test/regress/results/copytest.csv' csv quote '''' escape E'\\';
-ERROR: relation "copytest" does not exist
-copy copytest2 from '/home/abbas/pgxc/postgres-xc/src/test/regress/results/copytest.csv' csv quote '''' escape E'\\';
-ERROR: relation "copytest2" does not exist
-select * from copytest except select * from copytest2;
-ERROR: relation "copytest" does not exist
-LINE 1: select * from copytest except select * from copytest2;
- ^
--- test header line feature
-create temp table copytest3 (
- c1 int,
- "col with , comma" text,
- "col with "" quote" int);
-ERROR: PG-XC does not yet support temporary tables
-copy copytest3 from stdin csv header;
-ERROR: relation "copytest3" does not exist
-this is just a line full of junk that would error out if parsed
-1,a,1
-2,b,2
-\.
-invalid command \.
-copy copytest3 to stdout csv header;
-ERROR: syntax error at or near "this"
-LINE 1: this is just a line full of junk that would error out if par...
- ^
diff --git a/src/test/regress/sql/create_misc.sql b/src/test/regress/input/create_misc.source
index 3bfb242ccc..30c5ade374 100644
--- a/src/test/regress/sql/create_misc.sql
+++ b/src/test/regress/input/create_misc.source
@@ -29,7 +29,7 @@ CREATE TABLE onek2 (
string4 name
);
-COPY onek2 FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/onek.data';
+COPY onek2 FROM '@abs_srcdir@/data/onek.data';
INSERT INTO fast_emp4000 SELECT * FROM slow_emp4000;
diff --git a/src/test/regress/output/copy_1.source b/src/test/regress/output/copy_1.source
index be49c09480..5324b1f565 100644
--- a/src/test/regress/output/copy_1.source
+++ b/src/test/regress/output/copy_1.source
@@ -15,7 +15,6 @@ COPY person FROM '@abs_srcdir@/data/person.data';
COPY emp FROM '@abs_srcdir@/data/emp.data';
COPY student FROM '@abs_srcdir@/data/student.data';
COPY stud_emp FROM '@abs_srcdir@/data/stud_emp.data';
-ERROR: relation "stud_emp" does not exist
COPY road FROM '@abs_srcdir@/data/streets.data';
COPY real_city FROM '@abs_srcdir@/data/real_city.data';
COPY hash_i4_heap FROM '@abs_srcdir@/data/hash.data';
diff --git a/src/test/regress/expected/create_misc_1.out b/src/test/regress/output/create_misc_1.source
index 4fa9e6231b..53fbf2e476 100644
--- a/src/test/regress/expected/create_misc_1.out
+++ b/src/test/regress/output/create_misc_1.source
@@ -25,7 +25,7 @@ CREATE TABLE onek2 (
stringu2 name,
string4 name
);
-COPY onek2 FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/data/onek.data';
+COPY onek2 FROM '@abs_srcdir@/data/onek.data';
INSERT INTO fast_emp4000 SELECT * FROM slow_emp4000;
SELECT *
INTO TABLE Bprime
diff --git a/src/test/regress/expected/misc_1.out b/src/test/regress/output/misc_1.source
index 322fd26997..1c8e7af37b 100644
--- a/src/test/regress/expected/misc_1.out
+++ b/src/test/regress/output/misc_1.source
@@ -50,9 +50,9 @@ ERROR: table "tmp" does not exist
--
-- copy
--
-COPY onek TO '/home/abbas/pgxc/postgres-xc/src/test/regress/results/onek.data';
+COPY onek TO '@abs_builddir@/results/onek.data';
DELETE FROM onek;
-COPY onek FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/results/onek.data';
+COPY onek FROM '@abs_builddir@/results/onek.data';
SELECT unique1 FROM onek WHERE unique1 < 2 ORDER BY unique1;
unique1
---------
@@ -61,7 +61,7 @@ SELECT unique1 FROM onek WHERE unique1 < 2 ORDER BY unique1;
(2 rows)
DELETE FROM onek2;
-COPY onek2 FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/results/onek.data';
+COPY onek2 FROM '@abs_builddir@/results/onek.data';
SELECT unique1 FROM onek2 WHERE unique1 < 2 ORDER BY unique1;
unique1
---------
@@ -69,9 +69,9 @@ SELECT unique1 FROM onek2 WHERE unique1 < 2 ORDER BY unique1;
1
(2 rows)
-COPY BINARY stud_emp TO '/home/abbas/pgxc/postgres-xc/src/test/regress/results/stud_emp.data';
+COPY BINARY stud_emp TO '@abs_builddir@/results/stud_emp.data';
DELETE FROM stud_emp;
-COPY BINARY stud_emp FROM '/home/abbas/pgxc/postgres-xc/src/test/regress/results/stud_emp.data';
+COPY BINARY stud_emp FROM '@abs_builddir@/results/stud_emp.data';
ERROR: Error while running COPY
SELECT * FROM stud_emp ORDER BY 1,2;
name | age | location | salary | manager | gpa | percent