summaryrefslogtreecommitdiff
path: root/src/test/regress/output
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-06-26 03:04:37 +0000
committerBruce Momjian <bruce@momjian.us>2005-06-26 03:04:37 +0000
commitbb3cce4ec9cc157a8dfc80b5b1770c2beac0a57e (patch)
tree5631b9dda006f8c56f6b1d4f64c72f015adf2468 /src/test/regress/output
parentc96375a39b28e54e19fa5c9c2e3dd69c44b7618c (diff)
downloadpostgresql-bb3cce4ec9cc157a8dfc80b5b1770c2beac0a57e.tar.gz
Add E'' syntax so eventually normal strings can treat backslashes
literally. Add GUC variables: "escape_string_warning" - warn about backslashes in non-E strings "escape_string_syntax" - supports E'' syntax? "standard_compliant_strings" - treats backslashes literally in '' Update code to use E'' when escapes are used.
Diffstat (limited to 'src/test/regress/output')
-rw-r--r--src/test/regress/output/copy.source12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/output/copy.source b/src/test/regress/output/copy.source
index e6839d3f36..afdaa509d2 100644
--- a/src/test/regress/output/copy.source
+++ b/src/test/regress/output/copy.source
@@ -37,10 +37,10 @@ create temp table copytest (
style text,
test text,
filler int);
-insert into copytest values('DOS','abc\r\ndef',1);
-insert into copytest values('Unix','abc\ndef',2);
-insert into copytest values('Mac','abc\rdef',3);
-insert into copytest values('esc\\ape','a\\r\\\r\\\n\\nb',4);
+insert into copytest values('DOS',E'abc\r\ndef',1);
+insert into copytest values('Unix',E'abc\ndef',2);
+insert into copytest values('Mac',E'abc\rdef',3);
+insert into copytest values(E'esc\\ape',E'a\\r\\\r\\\n\\nb',4);
copy copytest to '@abs_builddir@/results/copytest.csv' csv;
create temp table copytest2 (like copytest);
copy copytest2 from '@abs_builddir@/results/copytest.csv' csv;
@@ -51,8 +51,8 @@ select * from copytest except select * from copytest2;
truncate copytest2;
--- same test but with an escape char different from quote char
-copy copytest to '@abs_builddir@/results/copytest.csv' csv quote '\'' escape '\\';
-copy copytest2 from '@abs_builddir@/results/copytest.csv' csv quote '\'' escape '\\';
+copy copytest to '@abs_builddir@/results/copytest.csv' csv quote '''' escape E'\\';
+copy copytest2 from '@abs_builddir@/results/copytest.csv' csv quote '''' escape E'\\';
select * from copytest except select * from copytest2;
style | test | filler
-------+------+--------