diff options
| author | Bruce Momjian | 2005-12-28 03:25:32 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2005-12-28 03:25:32 +0000 |
| commit | 87289ff35ca372f8c88d26cc9bffa942dd8d34a8 (patch) | |
| tree | 24b7ff16c544959dc255dbe3aa5ccdce23da6824 /src/test | |
| parent | 1b184c990f6aa50679ebccbf16d5bba4d7374ec6 (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.out | 3 | ||||
| -rw-r--r-- | src/test/regress/sql/copy2.sql | 10 |
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(); |
