Skip site navigation (1) Skip section navigation (2)

Re: postgres import

From: "Tomi NA" <hefest(at)gmail(dot)com>
To: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
Cc: "Antonios Katsikadamos *EXTERN*" <antonioskatsikadamos(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgres import
Date: 2006-10-31 23:17:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
2006/10/31, Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at>:
> > I have a little problem. I have an .sql file (  db dump  )
> > and i want to import it to postgres on linux.
> >
> > Does anyone know how i can do it?
> You feed it to the command line interface psql.
> Example:
> psql -h host -p port -d database -U user <dump.sql

It's a good enough solution in most cases, but when the rowcount
starts to skyrocket, it simply doesn't seem to cut it (at least I
couldn't make it to). To load 1,5M rows (~230MB of INSERT statements),
I used gvim (wonderful tool!) to transform the INSERT statements into
a CSV file and then used an ETL (kettle - another wonderful tool) tool
to import the data into the database.
This could have probably been done much easier: I'd welcome a helpful
hint so as I know next time. :)


In response to


pgsql-general by date

Next:From: Ron JohnsonDate: 2006-10-31 23:59:06
Subject: Text manipulation tools (was Re: postgres import)
Previous:From: Dimitri FontaineDate: 2006-10-31 22:38:44
Subject: Re: updating to 7.4.13 helped it appears

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group