From 659660c116bb839483f9f0dabc24250ba6072df8 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 9 Jun 2004 23:39:24 +0000 Subject: Add regression tests for CSV COPY format. --- src/test/regress/expected/copy2.out | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/test/regress/expected/copy2.out') diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out index 6345969a03..6048f9392f 100644 --- a/src/test/regress/expected/copy2.out +++ b/src/test/regress/expected/copy2.out @@ -172,6 +172,25 @@ I'm null before trigger fired 3 after trigger fired 4 after trigger fired 5 after trigger fired +CREATE TABLE y ( + col1 text, + col2 text +); +INSERT INTO y VALUES ('Jackson, Sam', '\\h'); +INSERT INTO y VALUES ('It is "perfect".','\t'); +INSERT INTO y VALUES ('', NULL); +COPY y TO stdout WITH CSV; +"Jackson, Sam",\h +"It is ""perfect"".", +"", +COPY y TO stdout WITH CSV QUOTE '''' DELIMITER '|'; +Jackson, Sam|\h +It is "perfect".| +''| +COPY y TO stdout WITH CSV FORCE QUOTE col2 ESCAPE '\\'; +"Jackson, Sam","\\h" +"It is \"perfect\"."," " +"", DROP TABLE x; DROP FUNCTION fn_x_before(); DROP FUNCTION fn_x_after(); -- cgit v1.2.1