Re: postgres import

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Tomi NA *EXTERN*" <hefest(at)gmail(dot)com>, "Alban Hertroys" <alban(at)magproductions(dot)nl>
Cc: "Antonios Katsikadamos *EXTERN*" <antonioskatsikadamos(at)yahoo(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: postgres import
Date: 2006-11-02 09:09:02
Message-ID: 52EF20B2E3209443BC37736D00C3C1380B367020@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>>>> 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).
>>
>> INSERT statements? You dumped with the -d flag, didn't you?
>
> No I didn't, actually. :) The data was never in the database in the
> first place: it was generated from a different source. True, it was
> generated as a CSV file which I converted into INSERT statements, but
> conversion between the two is not a problem (given 1.5GB of RAM).

Then the best way is to convert it back to a CSV and use the COPY
statement to load in into the table (or \copy from psql).
You don't need any third party tools for that, it's all in PostgreSQL.

Yours,
Laurenz Albe

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-11-02 09:30:05 Re: time value '24:00:00'
Previous Message Uwe C. Schroeder 2006-11-02 09:06:40 Re: time value '24:00:00'