Search Postgresql Archives

Re: Load data from a csv file without using COPY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 19 Jun 2018, at 22:16, Ravi Krishna <srkrishna@xxxxxxxxx> 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_dump that 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.






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux