Re: Using COPY to import large xml file - Mailing list pgsql-general

From Nicolas Paris
Subject Re: Using COPY to import large xml file
Date
Msg-id CA+ssMOQkESnR2r5b-5L819Rf9KJ95--dTaX1wTPXtyWqUqkpug@mail.gmail.com
Whole thread Raw
In response to Re: Using COPY to import large xml file  (Anto Aravinth <anto.aravinth.cse@gmail.com>)
Responses Re: Using COPY to import large xml file  (Anto Aravinth <anto.aravinth.cse@gmail.com>)
List pgsql-general

2018-06-25 16:25 GMT+02:00 Anto Aravinth <anto.aravinth.cse@gmail.com>:
Thanks a lot. But I do got lot of challenges! Looks like SO data contains lot of tabs within itself.. So tabs delimiter didn't work for me. I thought I can give a special demiliter but looks like Postrgesql copy allow only one character as delimiter :(

Sad, I guess only way is to insert or do a through serialization of my data into something that COPY can understand.

​easiest way would be:
xml -> csv -> \copy

​by csv, I mean regular quoted csv (Simply wrap csv field with double quote, and escape
enventually contained quotes with an other double quote.).

Postgresql copy csv parser is one of the most robust I ever tested
before.

pgsql-general by date:

Previous
From: Anto Aravinth
Date:
Subject: Re: Using COPY to import large xml file
Next
From: Anto Aravinth
Date:
Subject: Re: Using COPY to import large xml file