Re: Fixed width COPY - Mailing list pgsql-general

From Tom Lane
Subject Re: Fixed width COPY
Date
Msg-id 24136.989280554@sss.pgh.pa.us
Whole thread Raw
In response to Fixed width COPY  (webb sprague <wsprague@o1.com>)
List pgsql-general
webb sprague <wsprague@o1.com> writes:
> Does anybody know of a good way to COPY a file into a table if the data is
> based on fixed width format?

COPY insists on having delimiters; you'll need to translate the file
format into something COPY can deal with.

> Do I just have to write some code with scanf(Ick)?

If you like C, that would work, but you could doubtless accomplish the
same result with very short scripts in sed, awk, perl, tcl, or half a
dozen other text-bashing tools.  Pick your poison...

            regards, tom lane

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: 7.1-1 installation from RPM
Next
From: Joseph Shraibman
Date:
Subject: Re: Auto-timestamp generator (attached)