COPY TO duplicates "\" signs

Started by Abraham, Dannyover 17 years ago3 messagesgeneral
Jump to latest
#1Abraham, Danny
danny_abraham@bmc.com

Hi,

String in DB:

D:\Program Files\BMC Software\CONTROL-D\wa/reports

In the output files "\| are duplicated: The string in the output text
fileis
D:\\Program Files\\BMC Software\\CONTROL-D\\wa/reports
== == == ==

Standard_conforming_strings will not help here.

Any ideas? Help will be appreciated.

Thanks

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham@bmc.com

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Abraham, Danny (#1)
Re: COPY TO duplicates "\" signs

Abraham, Danny wrote:

String in DB:

D:\Program Files\BMC Software\CONTROL-D\wa/reports

In the output files "\| are duplicated: The string in the output text
fileis
D:\\Program Files\\BMC Software\\CONTROL-D\\wa/reports
== == == ==

Standard_conforming_strings will not help here.

Any ideas? Help will be appreciated.

Can you reproduce this with psql?

Can you select "length()" of this field (to see if it is 50 characters
long or not)?

How are the output files generated?

Yours,
Laurenz Albe

#3Ivan Sergio Borgonovo
mail@webthatworks.it
In reply to: Abraham, Danny (#1)
Re: COPY TO duplicates "\" signs

On Wed, 5 Nov 2008 05:06:36 -0600
"Abraham, Danny" <danny_abraham@bmc.com> wrote:

Hi,

String in DB:

D:\Program Files\BMC Software\CONTROL-D\wa/reports

In the output files "\| are duplicated: The string in the output
text fileis
D:\\Program Files\\BMC Software\\CONTROL-D\\wa/reports
== == == ==

try to play with the ESCAPE AS and set it as '' if you really want
to skip \.

http://www.postgresql.org/docs/8.1/static/sql-copy.html

--
Ivan Sergio Borgonovo
http://www.webthatworks.it