Re: importing csv files into v7.2.1 on Solaris 8 x86

From: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
To: "Russell Aspinwall" <russell(dot)aspinwall(at)flomerics(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: importing csv files into v7.2.1 on Solaris 8 x86
Date: 2002-04-25 15:29:16
Message-ID: 20020425112916.64c377f8.nconway@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 25 Apr 2002 09:13:10 +0100
"Russell Aspinwall" <russell(dot)aspinwall(at)flomerics(dot)co(dot)uk> wrote:
> Is their a utility which will read a database table definition and
> automatically import a csv format file expecting the fields to be in the
> correct order as the table?

Yes -- take a look at COPY, and/or the psql \copy command. The syntax
is something like:

COPY target_table FROM '/your/csv/file' USING DELIMITERS ',';

Cheers,

Neil

--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-04-25 15:37:33 Re: disk format changes
Previous Message David Link 2002-04-25 14:26:20 Re: Why is outer Join way quicker?