Re: Back Slash \ issue

2019-05-03 Thread Rob Sargent
On 5/3/19 10: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 uploa

RE: Back Slash \ issue

2019-05-03 Thread Guntry Vinod
Krishna ; Michael Nolan Cc: pgsql-gene...@postgresql.org; Venkatamurali Krishna Gottuparthi ; Biswa Ranjan Dash Subject: Re: Back Slash \ issue 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 DB

Re: Back Slash \ issue

2019-05-03 Thread Igor Korot
Hi, On Fri, May 3, 2019 at 11:20 AM Michael Nolan wrote: > > > > I'm still not clear what the backslash is for, it is ONLY to separate first > and last name? Can you change it to some other character? > > Others have suggested you're in a Windows environment, that might limit your > options.

Re: Back Slash \ issue

2019-05-03 Thread Michael Nolan
I'm still not clear what the backslash is for, it is ONLY to separate first and last name? Can you change it to some other character? Others have suggested you're in a Windows environment, that might limit your options. How big is the file, is it possible to copy it to another server to manipul

Re: Back Slash \ issue

2019-05-03 Thread Adrian Klaver
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 d

Re: Back Slash \ issue

2019-05-03 Thread Adrian Klaver
hna Sent: Friday, May 3, 2019 8:43 PM To: Michael Nolan Cc: Adrian Klaver ; Guntry Vinod ; pgsql-gene...@postgresql.org; Venkatamurali Krishna Gottuparthi ; Biswa Ranjan Dash Subject: Re: Back Slash \ issue I don't think we've seen enough representative data to know exactly what the

Re: Back Slash \ issue

2019-05-03 Thread Ravi Krishna
> > Hope Iam detail this time :-) > Unfortunately still not enough. Can you post sample of the data here. And what command you used in DB2. Pls post the SQL used in DB2 to dump the data.

RE: Back Slash \ issue

2019-05-03 Thread Guntry Vinod
-Original Message- From: Ravi Krishna Sent: Friday, May 3, 2019 8:43 PM To: Michael Nolan Cc: Adrian Klaver ; Guntry Vinod ; pgsql-gene...@postgresql.org; Venkatamurali Krishna Gottuparthi ; Biswa Ranjan Dash Subject: Re: Back Slash \ issue > > I don't think we've seen e

Re: Back Slash \ issue

2019-05-03 Thread Ravi Krishna
> > I don't think we've seen enough representative data to know exactly what the > backslash is doing. It doesn't appear to be an escape, based on the sole > example I've seen it appears to be a data separator between first name and > last name. > > It seems increasingly likely to me that you

Re: Back Slash \ issue

2019-05-03 Thread Michael Nolan
On Fri, May 3, 2019 at 9:35 AM Ravi Krishna wrote: > > > > In what format are you dumping the DB2 data and with what specifications > e.g. quoting? > > > > DB2's export command quotes the data with "". So while loading, shouldn't > that take care of delimiter-in-the-data issue ? > I don't think

Re: Back Slash \ issue

2019-05-03 Thread Adrian Klaver
On 5/3/19 7:35 AM, Ravi Krishna wrote: In what format are you dumping the DB2 data and with what specifications e.g. quoting? DB2's export command quotes the data with "". So while loading, shouldn't that take care of delimiter-in-the-data issue ? In the original post the only info was:

Re: Back Slash \ issue

2019-05-03 Thread Ravi Krishna
> > In what format are you dumping the DB2 data and with what specifications e.g. > quoting? > DB2's export command quotes the data with "". So while loading, shouldn't that take care of delimiter-in-the-data issue ?

Re: Back Slash \ issue

2019-05-03 Thread Bruce Momjian
On Fri, May 3, 2019 at 10:04:44AM -0400, Bruce Momjian wrote: > On thing the original poster might be missing is that the copy DELIMITER > is used between fields, while backslash is used as an escape before a > single character. While it might be tempting to try to redefine the > escape character

Re: Back Slash \ issue

2019-05-03 Thread Bruce Momjian
On Fri, May 3, 2019 at 06:55:55AM -0700, Adrian Klaver wrote: > On 5/2/19 10:48 PM, Guntry Vinod wrote: > > Please do not top post. Inline/bottom posting is the preferred style on this > list. > > Hi Team, > > > > We are using the below command > > > > COPY <> from 'C:\Data_Dump\ABC.txt' DELIMI

Re: Back Slash \ issue

2019-05-03 Thread Adrian Klaver
On 5/2/19 10:48 PM, Guntry Vinod wrote: Please do not top post. Inline/bottom posting is the preferred style on this list. Hi Team, We are using the below command COPY <> from 'C:\Data_Dump\ABC.txt' DELIMITER '|'; The above shows what you are doing on the input into Postgres. We still do no

Re: Back Slash \ issue

2019-05-03 Thread Matthias Apitz
El día Friday, May 03, 2019 a las 09:04:34AM +, Guntry Vinod escribió: > The postgre is running on Windows platform. Maybe you haven't read completely through the post you are top posting on. It was clear to me (from the used file name syntax) that you are on Windows; that's why I said: > Wh

RE: Back Slash \ issue

2019-05-03 Thread Biswa Ranjan Dash
z Cc: Andrew Gierth ; pgsql-gene...@postgresql.org; Adrian Klaver ; ravikris...@mail.com; Venkatamurali Krishna Gottuparthi ; Biswa Ranjan Dash Subject: RE: Back Slash \ issue The postgre is running on Windows platform. -Original Message- From: Matthias Apitz Sent: Friday, May 3, 201

RE: Back Slash \ issue

2019-05-03 Thread Guntry Vinod
Subject: Re: Back Slash \ issue El día Friday, May 03, 2019 a las 08:45:02AM +, Guntry Vinod escribió: > Hi Andrew, > > So you mean to say we need to replace \\ in data. If so the data what we > receive is huge chunk(we cannot open in notepad++ also) . > > ... Hi Guntry, Wha

Re: Back Slash \ issue

2019-05-03 Thread Matthias Apitz
El día Friday, May 03, 2019 a las 08:45:02AM +, Guntry Vinod escribió: > Hi Andrew, > > So you mean to say we need to replace \\ in data. If so the data what we > receive is huge chunk(we cannot open in notepad++ also) . > > ... Hi Guntry, What about piping the data on a Linux or any othe

RE: Back Slash \ issue

2019-05-03 Thread Guntry Vinod
-Original Message- From: Andrew Gierth Sent: Friday, May 3, 2019 1:37 PM To: Guntry Vinod Cc: Adrian Klaver ; ravikris...@mail.com; pgsql-gene...@postgresql.org; Venkatamurali Krishna Gottuparthi ; Biswa Ranjan Dash Subject: Re: Back Slash \ issue >>>>> "Guntry"

Re: Back Slash \ issue

2019-05-03 Thread Andrew Gierth
> "Guntry" == Guntry Vinod writes: Guntry> Hi Team, Guntry> We are using the below command Guntry> COPY <> 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 fo

RE: Back Slash \ issue

2019-05-03 Thread Guntry Vinod
org; Venkatamurali Krishna Gottuparthi ; Biswa Ranjan Dash Subject: Re: Back Slash \ issue On 5/2/19 8:19 AM, Guntry Vinod wrote: > Hi Adrian\Kiran, > > Below is the issue. > > We are migrating from Db2 to Postgre. > > The Db2 dump consists of back Slash \ with in the data [d

Re: Back Slash \ issue

2019-05-02 Thread Melvin Davidson
From: Adrian Klaver [adrian.kla...@aklaver.com] > > Sent: 02 May 2019 20:04 > > To: ravikris...@mail.com; Guntry Vinod > > Cc: pgsql-gene...@postgresql.org; Venkatamurali Krishna Gottuparthi; > Biswa Ranjan Dash > > Subject: Re: Back Slash \ issue > > > > On 5/

Re: Back Slash \ issue

2019-05-02 Thread Rob Sargent
...@postgresql.org; Venkatamurali Krishna Gottuparthi; Biswa Ranjan Dash Subject: Re: Back Slash \ issue On 5/2/19 7:30 AM, ravikris...@mail.com wrote: > We have dump from DB2 and trying to upload it Postgre. DB2 export command has an option to export it as CSV which quotes data so that any embe

RE: Back Slash \ issue

2019-05-02 Thread Guntry Vinod
Vinod ___ From: Adrian Klaver [adrian.kla...@aklaver.com] Sent: 02 May 2019 20:04 To: ravikris...@mail.com; Guntry Vinod Cc: pgsql-gene...@postgresql.org; Venkatamurali Krishna Gottuparthi; Biswa Ranjan Dash Subject: Re: Back Slash \ issue On 5/2/19 7:30 AM, ravikris...@mai

Re: Back Slash \ issue

2019-05-02 Thread Adrian Klaver
04 To: ravikris...@mail.com; Guntry Vinod Cc: pgsql-gene...@postgresql.org; Venkatamurali Krishna Gottuparthi; Biswa Ranjan Dash Subject: Re: Back Slash \ issue On 5/2/19 7:30 AM, ravikris...@mail.com wrote: > We have dump from DB2 and trying to upload it Postgre. DB2 export command has an o

Re: Back Slash \ issue

2019-05-02 Thread Adrian Klaver
On 5/2/19 7:34 AM, Adrian Klaver wrote: On 5/2/19 7:30 AM, ravikris...@mail.com wrote:  > We have dump from DB2 and trying to upload it Postgre. DB2 export command has an option to export it as CSV which quotes data so that any embedded lines or special characters inside the data is treated fin

Re: Back Slash \ issue

2019-05-02 Thread Adrian Klaver
On 5/2/19 7:30 AM, ravikris...@mail.com wrote: > We have dump from DB2 and trying to upload it Postgre. DB2 export command has an option to export it as CSV which quotes data so that any embedded lines or special characters inside the data is treated fine.  Does the csv format has quotes enclo

Re: Back Slash \ issue

2019-05-02 Thread ravikrishna
> We have dump from DB2 and trying to upload it Postgre.   DB2 export command has an option to export it as CSV which quotes data so that any embedded lines or special characters inside the data is treated fine.  Does the csv format has quotes enclosing it ?

Re: Back Slash \ issue

2019-05-02 Thread Adrian Klaver
On 5/2/19 5:20 AM, Guntry Vinod wrote: Hi Team, We have dump from DB2 and trying to upload it Postgre. What program did you use to take the dump? How are you importing the data into Postgres(note the 's')? What is the exact error message? The records which has \(back ward) are failing to

Back Slash \ issue

2019-05-02 Thread Guntry Vinod
Hi Team, We have dump from DB2 and trying to upload it Postgre. The records which has \(back ward) are failing to import. Can anyone in the team help us to resolve the issue. Can you also let us know if we are posting the question to the right team. Regards, Vinod =