Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMah0-00083G-AL for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2019 16:05:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hMagy-0002Wd-QD for pgsql-general@arkaria.postgresql.org; Fri, 03 May 2019 16:05:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMagy-0002WU-GS for pgsql-general@lists.postgresql.org; Fri, 03 May 2019 16:05:44 +0000 Received: from tmghyd4.techmahindra.com ([119.151.17.194]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMagu-0007HX-To for pgsql-general@postgresql.org; Fri, 03 May 2019 16:05:44 +0000 X-Disclaimer: true IronPort-PHdr: =?us-ascii?q?9a23=3ALjUSRhwVt0sptg7XCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?0usVLPad9pjvdHbS+e9qxAeQG9mCsrQb0qGH4+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fcbglVmTaxe7F/IAi5oQjVtcQdnJdvJLs2xhbVuHVDZv?= =?us-ascii?q?5YxXlvJVKdnhb84tm/8Zt++ClOuPwv6tBNX7zic6s3UbJXAjImM3so5MLwrhnM?= =?us-ascii?q?URGP5noHXWoIlBdDHhXI4wv7Xpf1tSv6q/Z91SyHNsD4Ubw4RTKv5LpwRRT2lC?= =?us-ascii?q?kIKSI28GDPisxxkq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kNZHC1ex2Ecz9WgXEft2RUlap?= =?us-ascii?q?Xs2mAS0tTtI229IOe0l9G867jhDHxiaqDKEal7qVC5wu6K3c22P8J956y3bdyK?= =?us-ascii?q?khgEMmTdVUNW2/gq5z7Q/TB5TGkxbRq6H/T60C3Wbu7maYzWyH9BVCWRBxUr/E?= =?us-ascii?q?RnAZb2PTpNX9oEjFSunqQZEmOQtIxMrKDKxOY9uh2VVaSvDkJPzRZmuwnyG7Ah?= =?us-ascii?q?PelZ2Wa4+/VHgbwD/MQHYFlQcftSKpC1BmWH7w/DmDJABjHlLKakPt9+VkoTWw?= =?us-ascii?q?SUpinFLCVFFoy7fgok1dvvebUf5Gm+tc4Co=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EOBQCLZsxc/6GCNQplHAEBAQQBAQcEA?= =?us-ascii?q?QGBZUSDYgqXbAaBNYk+Do8agWcQhG0Cgio4EwEDAQEFAQEBAQIBAQKBEYI6KQG?= =?us-ascii?q?CZwEBAQECATo2CQwEAgEIDQQEAQEfECERHQgCBAENBQgThHIDCQWqZ4RTGoVug?= =?us-ascii?q?XkNCFWBRYEygWCIUIItgQeDU1A+ghqBdwERAgElMYUqBIEtAQEBiWMxhnmUECw?= =?us-ascii?q?4AQYCAYILjnaDRyOMJwOJHowbiBeMeoFmUhIBImsGMxojM4E7gU6QUXKQH4EhA?= =?us-ascii?q?QE?= X-IPAS-Result: =?us-ascii?q?A2EOBQCLZsxc/6GCNQplHAEBAQQBAQcEAQGBZUSDYgqXbAa?= =?us-ascii?q?BNYk+Do8agWcQhG0Cgio4EwEDAQEFAQEBAQIBAQKBEYI6KQGCZwEBAQECATo2C?= =?us-ascii?q?QwEAgEIDQQEAQEfECERHQgCBAENBQgThHIDCQWqZ4RTGoVugXkNCFWBRYEygWC?= =?us-ascii?q?IUIItgQeDU1A+ghqBdwERAgElMYUqBIEtAQEBiWMxhnmUECw4AQYCAYILjnaDR?= =?us-ascii?q?yOMJwOJHowbiBeMeoFmUhIBImsGMxojM4E7gU6QUXKQH4EhAQE?= X-IronPort-AV: E=Sophos;i="5.60,426,1549909800"; d="scan'208";a="13529473" Received: from unknown (HELO BLREXCHMBX001.TechMahindra.com) ([10.53.130.161]) by TMGHYD4.TechMahindra.com with ESMTP/TLS/AES256-SHA256; 03 May 2019 21:35:04 +0530 Received: from HYDEXCHMBX003.TechMahindra.com (10.56.222.129) by BLREXCHMBX001.TechMahindra.com (10.53.130.161) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 3 May 2019 21:35:03 +0530 Received: from HYDEXCHMBX003.TechMahindra.com ([fe80::4c1d:fa5a:d380:e1ea]) by HYDEXCHMBX003.TechMahindra.com ([fe80::4c1d:fa5a:d380:e1ea%18]) with mapi id 15.00.1130.005; Fri, 3 May 2019 21:35:03 +0530 From: Guntry Vinod To: Ravi Krishna , Michael Nolan CC: Adrian Klaver , "pgsql-general@postgresql.org" , Venkatamurali Krishna Gottuparthi , Biswa Ranjan Dash Subject: RE: Back Slash \ issue Thread-Topic: Back Slash \ issue Thread-Index: AdUA4NcC/iRC3bxaQlilJKiB5c3SvP//yTgAgAABQ4CAAGchRf//p6MA//6zn9CAAsUbgIAACvGAgAACXQCAAAhCAP//mYvg Date: Fri, 3 May 2019 16:05:03 +0000 Message-ID: <3c30cf5a10594124afb151a29e335ca2@HYDEXCHMBX003.TechMahindra.com> References: <3f17d700-5cfb-637a-dc70-112b69e53b01@aklaver.com> <797cd76f5520436f87e68ebe980972d3@HYDEXCHMBX003.TechMahindra.com> <1989ca98-23e4-21c2-addd-1710ad78cbf7@aklaver.com> <336AC136-C15B-4B46-899F-9674CA15500A@mail.com> <346D2F54-D13D-4C45-9E42-1E51F36ED85F@mail.com> In-Reply-To: <346D2F54-D13D-4C45-9E42-1E51F36ED85F@mail.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.56.205.139] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 <> from 'C:\Data_Dump\ABC.txt' DELIMITER '|'; ) Step 4:In the above step we are using delimiter because the data is separat= ed (:) 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 w= e got from the DB2 but few data the data consist of " \".For example if th= e CustomerName is Vinod\G in the flat file ,we expect the same data in Post= Gre 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 l= arge 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 i= s (for example if Vinod\G then we should see in PostGre as Vinod\G but not = VinodG) Hope Iam detail this time :-) Regards, Vinod = -----Original Message----- From: Ravi Krishna = Sent: Friday, May 3, 2019 8:43 PM To: Michael Nolan Cc: Adrian Klaver ; Guntry Vinod ; pgsql-general@postgresql.org; Venkatamurali Krishna Gottupa= rthi ; Biswa Ranjan Dash Subject: Re: Back Slash \ issue > = > 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 so= le example I've seen it appears to be a data separator between first name a= nd last name. > = > It seems increasingly likely to me that you might not be in a position wh= ere the COPY command in PostgreSQL can handle loading the database, at leas= t not without some help. You might have to write a program to clean up the= data and format it for PostgreSQL. = > = > I've spent a lot of time over the years migrating data from one platform = to another, you have to know EXACTLY what data you currently have and what = format you need it turned into before you can figure out how to do the tran= sformation. = > -- > Mike Nolan Fully agreed. I have informed Guntry via email that he has to provide more= information before we can help further. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Disclaimer: This message and the information contained herein is proprieta= ry and confidential and subject to the Tech Mahindra policy statement, you = may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.= com/tim/disclaimer.html i= nternally within TechMahindra. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D