Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.

                      Let Accuracy Triumph Over Victory

                                                       Zetetic Institute
                                                        "David's Sling"
                                                         Marc Stiegler

In response to

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group