pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Guntry Vinod <GV00619735@TechMahindra.com>
To: Ravi Krishna <ravikrishna@mail.com>
To: Michael Nolan <htfoot@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Cc: Venkatamurali Krishna Gottuparthi <VG00114307@TechMahindra.com>
Cc: Biswa Ranjan Dash <BD00617837@TechMahindra.com>
Subject: Re: Back Slash \ issue
Date: Fri, 3 May 2019 09:17:19 -0700
Message-ID: <856f0d11-c59a-c1c6-dd4d-a90bfad14131@aklaver.com> (raw)
In-Reply-To: <3c30cf5a10594124afb151a29e335ca2@HYDEXCHMBX003.TechMahindra.com>
References: <ad7149ce9d594ed396bebad4194e57d6@HYDEXCHMBX003.TechMahindra.com>
	<trinity-2a68e86c-51d7-41a2-8008-1a21c0850f0e-1556807412712@3c-app-mailcom-lxa07>
	<3f17d700-5cfb-637a-dc70-112b69e53b01@aklaver.com>
	<797cd76f5520436f87e68ebe980972d3@HYDEXCHMBX003.TechMahindra.com>
	<1989ca98-23e4-21c2-addd-1710ad78cbf7@aklaver.com>
	<f402601ecb4443ab85ef5f7fc0d4aade@HYDEXCHMBX003.TechMahindra.com>
	<eda4ea88-d767-3495-440e-8242815ed013@aklaver.com>
	<336AC136-C15B-4B46-899F-9674CA15500A@mail.com>
	<CAOzAqu+tQ5v4pHDw=M7=+ZQ3k+600yY-nnMFPDpZk_hQcTkSiQ@mail.gmail.com>
	<346D2F54-D13D-4C45-9E42-1E51F36ED85F@mail.com>
	<3c30cf5a10594124afb151a29e335ca2@HYDEXCHMBX003.TechMahindra.com>

On 5/3/19 9:05 AM, Guntry Vinod wrote:
> Hi Team,
> 
> Here we go. I will give the problem in more detail
> 
> Step 1:We get the dump from DB2 and this dump is flat file which can be csv,txt
> Step2:There is table in PostGre where we are suppose  to upload the dump
> Step3:We are using copy command to upload dump to the table using (COPY <<TableName>> from 'C:\Data_Dump\ABC.txt' DELIMITER '|';  )

Should have been in my previous post. The answer to whether Step 1 is 
text or CSV is important as that determines the way you use the COPY 
command above. As has been pointed out upstream using COPY assuming 
text(as you are doing above) on a CSV file will create issues.

> Step 4:In the above step we are using delimiter because the data is separated (:) in the flat which we have received from the flat file
> 
> Problem Statement:We are able to upload the data from the flat file which we got from the DB2 but few data the data consist of  " \".For example if the CustomerName is Vinod\G in the flat file ,we expect the same data in PostGre  table for CustomerName as Vinod\G but we see VinodG(slash is missed).
> 
> Possible Solution: We can replace "\" with "\\" but if the file is in too large we cannot open it(we can replace if the file is medium or small)
> 
> Expectation: We need a command or utility which can upload the data as it is (for example if Vinod\G then we should see in PostGre as Vinod\G but not VinodG)
> 
> Hope Iam detail this time :-)
> 
> Regards,
> Vinod
> 
> 
>   
> 



-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (31+ messages)  latest in thread

Message-ID: <856f0d11-c59a-c1c6-dd4d-a90bfad14131@aklaver.com>
Permalink:  ../856f0d11-c59a-c1c6-dd4d-a90bfad14131@aklaver.com/
Also on:    postgresql.org/message-id/856f0d11-c59a-c1c6-dd4d-a90bfad14131@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, GV00619735@TechMahindra.com, ravikrishna@mail.com, htfoot@gmail.com, VG00114307@TechMahindra.com, BD00617837@TechMahindra.com
  Subject: Re: Back Slash \ issue
  In-Reply-To: <856f0d11-c59a-c1c6-dd4d-a90bfad14131@aklaver.com>
  References: <ad7149ce9d594ed396bebad4194e57d6@HYDEXCHMBX003.TechMahindra.com> <trinity-2a68e86c-51d7-41a2-8008-1a21c0850f0e-1556807412712@3c-app-mailcom-lxa07> <3f17d700-5cfb-637a-dc70-112b69e53b01@aklaver.com> <797cd76f5520436f87e68ebe980972d3@HYDEXCHMBX003.TechMahindra.com> <1989ca98-23e4-21c2-addd-1710ad78cbf7@aklaver.com> <f402601ecb4443ab85ef5f7fc0d4aade@HYDEXCHMBX003.TechMahindra.com> <eda4ea88-d767-3495-440e-8242815ed013@aklaver.com> <336AC136-C15B-4B46-899F-9674CA15500A@mail.com> <CAOzAqu+tQ5v4pHDw=M7=+ZQ3k+600yY-nnMFPDpZk_hQcTkSiQ@mail.gmail.com> <346D2F54-D13D-4C45-9E42-1E51F36ED85F@mail.com> <3c30cf5a10594124afb151a29e335ca2@HYDEXCHMBX003.TechMahindra.com> <856f0d11-c59a-c1c6-dd4d-a90bfad14131@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox