Re: Load data from a csv file without using COPY - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Load data from a csv file without using COPY
Date
Msg-id D6B45102-778D-4B35-9FB8-B007CE2A7A06@gmail.com
Whole thread Raw
In response to Load data from a csv file without using COPY  (Ravi Krishna <srkrishna@yahoo.com>)
Responses Re: Load data from a csv file without using COPY  (Ravi Krishna <srkrishna@yahoo.com>)
Re: Load data from a csv file without using COPY  (Asif Ali <asif2k@hotmail.com>)
List pgsql-general
> On 19 Jun 2018, at 22:16, Ravi Krishna <srkrishna@yahoo.com> wrote:
>
> In order to test a real life scenario (and use it for benchmarking) I want to load large number of data from csv
files.  
> The requirement is that the load should happen like an application writing to the database ( that is, no COPY
command). 
> Is there a tool which can do the job.  Basically parse the csv file and insert it to the database row by row.
>
> thanks

I think an easy approach would be to COPY the CSV files into a separate database using psql's \copy command and then
pg_dumpthat as separate insert statements with pg_dump —inserts. 

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



pgsql-general by date:

Previous
From: Steve Atkins
Date:
Subject: Re: Load data from a csv file without using COPY
Next
From: Ravi Krishna
Date:
Subject: Re: Load data from a csv file without using COPY