summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBruce Momjian2005-12-28 05:38:27 +0000
committerBruce Momjian2005-12-28 05:38:27 +0000
commitc7fc2ccf63f054ac60bde739077fbcfb5f86de69 (patch)
treedf613216f5e7c76f5b17dee0b851241b35d63139 /src/test
parent3f99c2d5a737ee5a8e3d8b24d04340f25f5f8bc5 (diff)
Add regression tests for CSV and \., and add automatic quoting of a
single column dump that has a \. value, so the load works properly. I also added documentation describing this issue. Backpatch to 8.1.X.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/copy2.out3
-rw-r--r--src/test/regress/sql/copy2.sql10
2 files changed, 13 insertions, 0 deletions
diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out
index 78f20605702..524e88cbae6 100644
--- a/src/test/regress/expected/copy2.out
+++ b/src/test/regress/expected/copy2.out
@@ -194,6 +194,9 @@ COPY y TO stdout WITH CSV FORCE QUOTE col2 ESCAPE E'\\';
--test that we read consecutive LFs properly
CREATE TEMP TABLE testnl (a int, b text, c int);
COPY testnl FROM stdin CSV;
+-- test end of copy marker
+CREATE TEMP TABLE testeoc (a text);
+COPY testeoc FROM stdin CSV;
DROP TABLE x, y;
DROP FUNCTION fn_x_before();
DROP FUNCTION fn_x_after();
diff --git a/src/test/regress/sql/copy2.sql b/src/test/regress/sql/copy2.sql
index add8214d19d..d962d2e048e 100644
--- a/src/test/regress/sql/copy2.sql
+++ b/src/test/regress/sql/copy2.sql
@@ -139,6 +139,16 @@ COPY testnl FROM stdin CSV;
inside",2
\.
+-- test end of copy marker
+CREATE TEMP TABLE testeoc (a text);
+
+COPY testeoc FROM stdin CSV;
+a\.
+\.b
+c\.d
+"\."
+\.
+
DROP TABLE x, y;
DROP FUNCTION fn_x_before();