Re: import fixed width files into PostgreSQL

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
Cc: "pgsql (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: import fixed width files into PostgreSQL
Date: 2003-04-15 15:21:00
Message-ID: m3ader9483.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-04-15 16:18:28 Re: Are we losing momentum?
Previous Message Jay O'Connor 2003-04-15 15:15:48 Re: Appending to an array