summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBruce Momjian2005-12-28 03:25:32 +0000
committerBruce Momjian2005-12-28 03:25:32 +0000
commit87289ff35ca372f8c88d26cc9bffa942dd8d34a8 (patch)
tree24b7ff16c544959dc255dbe3aa5ccdce23da6824 /src/test
parent1b184c990f6aa50679ebccbf16d5bba4d7374ec6 (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.
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 78f2060570..524e88cbae 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 add8214d19..d962d2e048 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();