Обсуждение: Initializing tables from flat files

Поиск
Список
Период
Сортировка

Initializing tables from flat files

От
Дата:



I have several tables of data represented as newline-delimited records
of tab-delimited fields in flat files.

What is the easiest way (e.g. in psql) to initialize PostgreSQL tables
from these flat files?  Is there a way to do this without writing a
bazillion INSERT statements?

Thanks!

kj



Re: Initializing tables from flat files

От
googleplex6000@yahoo.com (Joe)
Дата:
kynn@panix.com wrote in message news:<200403011958.i21JwO527887@panix3.panix.com>...
> I have several tables of data represented as newline-delimited records
> of tab-delimited fields in flat files.
>
> What is the easiest way (e.g. in psql) to initialize PostgreSQL tables
> from these flat files?  Is there a way to do this without writing a
> bazillion INSERT statements?
>
> Thanks!
>
> kj
>
>

COPY ... FROM ...

http://www.postgresql.org/docs/7.4/static/tutorial-populate.html