populating postgresql from tab-delimited text file

Поиск
Список
Период
Сортировка
От ksprague@NRCan.gc.ca
Тема populating postgresql from tab-delimited text file
Дата
Msg-id 3BA6500B.87BFE452@NRCan.gc.ca
обсуждение исходный текст
Список pgsql-novice
Hi,

What is quickest and dirtiest way to load the contents of a
tab-delimited text file into a postgresql database?

I would like to do this with a batch file that expects certain specified
fields from the data text file (fields may belong to different tables).
Speed is also an issue -- I fear that repeated INSERT commands may be
too slow.

I thought of writing an sql statement file and then using the -f option,
but I would rather skip having to create an intermediate file and do the
insertions directly.

Has anyone done this? Any example shell code...using COPY command
perhaps? :>

Regards,
Kevin

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

Предыдущее
От: "ericnielsen@pop.ne.mediaone.net"
Дата:
Сообщение: JOINs in FROM...
Следующее
От: ksprague@NRCan.gc.ca
Дата:
Сообщение: populating postgresql from tab-delimited text file