Обсуждение: import fixed width files into PostgreSQL

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

import fixed width files into PostgreSQL

От
"Johnson, Shaunn"
Дата:

Howdy:

Running PostgreSQL 7.2.1 on RedHat Linux 7.2.

Is it possible to import, or otherwise '\copy', files into Pg tables
that are in a fixed width (no spaces) format?  If so, am I just
using copy or is there a method (example) for this somewhere?

Thanks!

-X

Re: import fixed width files into PostgreSQL

От
Doug McNaught
Дата:
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:

> Howdy:
>
> Running PostgreSQL 7.2.1 on RedHat Linux 7.2.
>
> Is it possible to import, or otherwise '\copy', files into Pg tables
> that are in a fixed width (no spaces) format?  If so, am I just
> using copy or is there a method (example) for this somewhere?

COPY requires delimiters; you'll have to massage it into delimited
form (or into INSERT statements) using a Perl script or whatever.

-Doug