From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Guntry Vinod <GV00619735(at)TechMahindra(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "ravikrishna\(at)mail(dot)com" <ravikrishna(at)mail(dot)com>, "pgsql-general\(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, Venkatamurali Krishna Gottuparthi <VG00114307(at)TechMahindra(dot)com>, "Biswa Ranjan Dash" <BD00617837(at)TechMahindra(dot)com> |
Subject: | Re: Back Slash \ issue |
Date: | 2019-05-03 08:07:03 |
Message-ID: | 87h8achsx2.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>>>> "Guntry" == Guntry Vinod <GV00619735(at)TechMahindra(dot)com> writes:
Guntry> Hi Team,
Guntry> We are using the below command
Guntry> COPY <<TableName>> from 'C:\Data_Dump\ABC.txt' DELIMITER '|';
COPY in postgresql expects one of two data formats; since you did not
specify CSV, in this case it's expecting the default postgresql format
which requires the use of \ for escapes like \r, \n, \t, \\, \012 and
for the default NULL specification of \N.
If you use this format it is therefore your responsibility to ensure
that any literal \ characters in the data are escaped as \\, and that
any literal appearance of the delimiter character or a newline is also
escaped.
See https://www.postgresql.org/docs/current/sql-copy.html under "Text
format".
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Guntry Vinod | 2019-05-03 08:45:02 | RE: Back Slash \ issue |
Previous Message | Igal Sapir | 2019-05-03 06:45:05 | Re: Starting Postgres when there is no disk space |