diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/copy.out | 13 | ||||
| -rw-r--r-- | src/test/regress/sql/copy.sql | 16 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/test/regress/expected/copy.out b/src/test/regress/expected/copy.out index 174fe056033..f554d42c84c 100644 --- a/src/test/regress/expected/copy.out +++ b/src/test/regress/expected/copy.out @@ -50,6 +50,19 @@ select test from copytest2 order by test collate "C"; line2 (3 rows) +-- in text mode, \. must be alone on its line +truncate copytest2; +copy copytest2(test) from stdin; +ERROR: end-of-copy marker is not alone on its line +CONTEXT: COPY copytest2, line 3 +copy copytest2(test) from stdin; +ERROR: end-of-copy marker is not alone on its line +CONTEXT: COPY copytest2, line 3 +select test from copytest2; + test +------ +(0 rows) + -- test header line feature create temp table copytest3 ( c1 int, diff --git a/src/test/regress/sql/copy.sql b/src/test/regress/sql/copy.sql index 8ed7922ab49..f1699b66b04 100644 --- a/src/test/regress/sql/copy.sql +++ b/src/test/regress/sql/copy.sql @@ -50,6 +50,22 @@ truncate copytest2; copy copytest2(test) from :'filename' csv; select test from copytest2 order by test collate "C"; +-- in text mode, \. must be alone on its line +truncate copytest2; +copy copytest2(test) from stdin; +line1 +line2 +foo\. +line3 +\. +copy copytest2(test) from stdin; +line4 +line5 +\.foo +line6 +\. +select test from copytest2; + -- test header line feature |
