Re: How to import a CSV file (originally from Excel)

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Craig White" <craigwhite(at)azapple(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to import a CSV file (originally from Excel)
Date: 2006-04-12 15:57:55
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA3529C@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > \copy "Flight Traffic" from yourfile.csv delimiter as ','
> csv quote as
> > '"'
> >
> > (might need some adaption, of course)
> >
> >
> > Loading 45,000 lines is trivial for copy, it shouldn't take
> noticable
> > time at all.
> ----
> along these lines - can I do something similar (CSV file) but
> 'update' 2 or 3 columns?

I'd use COPY to a temp table, then run a normal UPDATE on that.

//Magnus

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anton Andreev 2006-04-12 16:00:48 table as hashtable
Previous Message Janning Vygen 2006-04-12 15:53:00 Hardware related question: 3ware 9500S