Input from files - Mailing list pgsql-general

From Mark Jewiss
Subject Input from files
Date
Msg-id Pine.BSO.4.10.9909101543490.22294-100000@office.knowledge.com
Whole thread Raw
List pgsql-general
Hello,

I often use psql -f <filename> to input data from files that come from
legacy systems/other people.

Is there a way to input these into pgsql without the file having any
insert commands into it?

I've been given a large csv file that has come straight out of MS Excel,
and don't really want to have to go all through the file entering the
insert commands on either side of the values. Although I could use vi's
global search and replace, but that is messy.

Basically I just want to input a raw csv file....

Regards,

Mark.
--
Mark Jewiss
Knowledge Matters Limited
http://www.knowledge.com


pgsql-general by date:

Previous
From: Oleg Broytmann
Date:
Subject: Re: [HACKERS] Re: Query about postgres medical database
Next
From: Stuart Rison
Date:
Subject: Re: [GENERAL][SQL] Getting multiple field unique index to distinguish NULLs.