Re: postgres import

Поиск
Список
Период
Сортировка
От Tomi NA
Тема Re: postgres import
Дата
Msg-id d487eb8e0611020744l1650d804o330b09a169fdc5c7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgres import  ("Albe Laurenz" <all@adv.magwien.gv.at>)
Список pgsql-general
2006/11/2, Albe Laurenz <all@adv.magwien.gv.at>:
> >>>> 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.

I had a problem with copy, but I can't remember what exactly...come to
think of it, it could have probably done the job...assuming I define
the primary key as DEFAULT nextval('id'), as I had no id in the rows I
was importing...nice to have alternatives. Thanks for the suggestion.

t.n.a.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Sandeep Kumar Jakkaraju"
Дата:
Сообщение: Re: PostGIS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Availability of pg_backend_pid() immediately after connection establishment