Re: Importing into Postgres from a csv file

From: David Steuber <nospam(at)david-steuber(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Importing into Postgres from a csv file
Date: 2000-08-23 21:00:05
Message-ID: m3ya1nr9j3.fsf@solo.david-steuber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jake" <ccrasoro(at)home(dot)com> writes:

' Does any one know if this is possible, and if so how?

With my present knowledge, I would either use a Perl script to create
a file that looks like the file you get when you dump a table, or I
would use the DBI/DBD::Pg modules to insert the rows, one by one.

The method I choose would depend on whether the data replaces the old
data or is added to it.

I just bought the "Programming the Perl DBI" book published by
O'Reilly, so needless to say, I am not quite ready to import a cvs
file yet.

--
David Steuber | "Are you now, or have you ever been, a member
NRA Member | of the NRA?" --- HUAC, 2004

Happiness is a SAAB Gripen <http://www.gripen.saab.se/> in the
garage, an FN-FAL in the safe, and an HK P7M8 on the hip.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Haight 2000-08-23 21:17:30 Large object insert performance.
Previous Message Jake 2000-08-23 19:56:14 Importing into Postgres from a csv file