summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2012-08-24 04:52:19 +0000
committerMichael Paquier2012-08-24 04:52:19 +0000
commitd22ea34ce63529f1a68189c3c524f5a535c64a0c (patch)
treefe8e053ec00518dbd337f17846d5ba8a08109cb6
parent4182cf295fb1ef0df86071c5a645f38e2df4a66a (diff)
Add test case in xc_copy to test COPY on quoted tables
This allows to check that remote COPY generation is correct for such particular cases.
-rw-r--r--src/test/regress/input/xc_copy.source10
-rw-r--r--src/test/regress/output/xc_copy.source8
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/regress/input/xc_copy.source b/src/test/regress/input/xc_copy.source
index efce40287b..d0e395c7f5 100644
--- a/src/test/regress/input/xc_copy.source
+++ b/src/test/regress/input/xc_copy.source
@@ -99,3 +99,13 @@ INSERT INTO xc_copy_1 VALUES (1,23),(34,5),(9,11);
-- Extract its data
COPY xc_copy_1 TO STDOUT;
DROP TABLE xc_copy_1;
+
+-- Quoted table
+-- check for correct remote query generation
+CREATE TABLE "Xc_copy_2" (a int, b int);
+COPY "Xc_copy_2" FROM STDIN DELIMITER ',';
+1,2
+3,4
+\.
+COPY "Xc_copy_2" TO STDOUT;
+DROP TABLE "Xc_copy_2";
diff --git a/src/test/regress/output/xc_copy.source b/src/test/regress/output/xc_copy.source
index ee95542890..ddc5221d35 100644
--- a/src/test/regress/output/xc_copy.source
+++ b/src/test/regress/output/xc_copy.source
@@ -100,3 +100,11 @@ COPY xc_copy_1 TO STDOUT;
34 5
9 11
DROP TABLE xc_copy_1;
+-- Quoted table
+-- check for correct remote query generation
+CREATE TABLE "Xc_copy_2" (a int, b int);
+COPY "Xc_copy_2" FROM STDIN DELIMITER ',';
+COPY "Xc_copy_2" TO STDOUT;
+1 2
+3 4
+DROP TABLE "Xc_copy_2";