Re: Postgresql Copy

From: "Roderick A(dot) Anderson" <raanders(at)tincan(dot)org>
To: pgsql-general(at)postgresql(dot)org
Cc: "samsom, debra" <dsamsom(at)bristol(dot)ca>
Subject: Re: Postgresql Copy
Date: 2001-10-31 23:37:47
Message-ID: Pine.LNX.4.10.10110311534570.24907-100000@tincan.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 31 Oct 2001, Andrew Gould wrote:

> 2. There's a huge fixed width file that I receive
> every quarter. Since the structure is the same, I
> wrote a python script that copies the data to a new
> file, inserting tab delimiters and stripping out the
> extra spaces as it goes. The resulting file is often
> one third the size of the original. I then use copy
> to import the tab delimited data into PostgreSQL.

I've done the same thing using perl. In fact I have actually just
read, parsed, and then inserted the data directly into PostgreSQL.

Cheers,
Rod
--
Let Accuracy Triumph Over Victory

Zetetic Institute
"David's Sling"
Marc Stiegler

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2001-11-01 01:01:15 Re: CP1250 to and from Unicode conversion, how?
Previous Message Jason Earl 2001-10-31 23:31:56 Re: Postgresql Copy