Re: Populating large DB from Perl script

Поиск
Список
Период
Сортировка
От Kynn Jones
Тема Re: Populating large DB from Perl script
Дата
Msg-id c2350ba40711021145r7c630ec9r7bb9c2ff74b25ca6@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Populating large DB from Perl script  (andy <andy@squeakycode.net>)
Ответы Re: Populating large DB from Perl script
Re: Populating large DB from Perl script
Список pgsql-general
> So... not really an answer (other than I used a stored proc)

Actually, I'm interested in your solution.

Just to make sure I understood what you did: you bulk-populated (i.e.
with $dbh->do('COPY...'), $dbh->pg_putline(...), $dbh->pg_endcopy) the
referring tables, with their fkey constraints disabled; then you ran
stored procedure(s) that went through these referring tables and
filled in the missing fkeys; and finally you activated their fkey
constraints.  Is this right?

I'm very much of a stored procedures dunce, so if the code for your
stored procedure is "postable", please do.

TIA,

kj

PS: As an aside to the list, as a programmer, when I'm starting out in
language, I learn more than I can say from reading source code written
by the experts, but for some reason I have had a hard time coming
across expertly written PostgreSQL stored procedures, other than the
occasionally didactic snippet in the docs.  All these expertly-written
procedures seem to be very STORED away indeed!  If, on the contrary,
it's just the case that I haven't looked in the right places, please
hurl me a cluebrick!

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Cybercluster
Следующее
От: "Dawid Kuroczko"
Дата:
Сообщение: Re: Populating large DB from Perl script