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

Re: Importing CSV file

From: Andrew McMillan <Andrew(at)catalyst(dot)net(dot)nz>
To: John Poltorak <jp(at)eyup(dot)org>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Importing CSV file
Date: 2001-01-15 18:08:50
Message-ID: 3A633CB2.EBE09227@catalyst.net.nz (view raw or flat)
Thread:
Lists: pgsql-novice
John Poltorak wrote:
> 
> Is there a simple way to import a CSV file into a Postgres database?

If it is a simple CSV file then you should be able to manage with the
COPY command, using appropriate values for DELIMITERS.

If your CSV file has text quoted, and which includes line breaks within
fields, then you need to get more complex.

I have a perl script you can use in this case, if you want.

Regards,
					Andrew.
-- 
_____________________________________________________________________
           Andrew McMillan, e-mail: Andrew(at)catalyst(dot)net(dot)nz
Catalyst IT Ltd, PO Box 10-225, Level 22, 105 The Terrace, Wellington
Me: +64 (21) 635 694, Fax: +64 (4) 499 5596, Office: +64 (4) 499 2267

In response to

Responses

pgsql-novice by date

Next:From: John PoltorakDate: 2001-01-15 18:19:39
Subject: Re: Importing CSV file
Previous:From: Petros MylonopoulosDate: 2001-01-15 16:31:42
Subject: Re: Too many open connections

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