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

Re: Fixed field text import

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Fixed field text import
Date: 2003-10-31 19:18:01
Message-ID: m365i5md1y.fsf@varsoon.wireboard.com (view raw or flat)
Thread:
Lists: pgsql-general
Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz> writes:

> Is there an easy way (similar to COPY) to import fixed width text files
> directly into Postgres tables?
> 
> COPY is fine for files with delimited fields, but I have fixed format text
> files to import into tables.

There's no built-in method; you'll need to write a script of some sort
to import the data or convert it to delimited format.

-Doug

In response to

pgsql-general by date

Next:From: Stephan SzaboDate: 2003-10-31 19:23:06
Subject: Re: table locking.. FK tables locking on insert
Previous:From: Stephan SzaboDate: 2003-10-31 19:16:33
Subject: Re: Attribute 'rtrim' is repeated

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