Re: Import csv file into multiple tables in Postgres - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: Import csv file into multiple tables in Postgres
Date
Msg-id 20050304151146.GA19477@wolff.to
Whole thread Raw
In response to Re: Import csv file into multiple tables in Postgres  (Deepblues <deepblues@gmail.com>)
List pgsql-novice
On Thu, Mar 03, 2005 at 14:10:58 -0600,
  Deepblues <deepblues@gmail.com> wrote:
> Thanks for all that information, My scenario looks like this ...
>
>  I need to import an excel spreadsheet into the postgresql database .
> I converted the excel spreadsheet into a csv file and now I have 3
> tables in my database where I need to import this data. Im new to both
> perl and postgres. do you have any sample script that I can have a
> look at which loads the csv file into a interface table ?

If you are using 8.0, you should be able to use COPY (or /copy from psql)
to read in the files with one copy command per file. If there are no
quoted values in the csv files, then you can do this on older versions
of Postgres.

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: User right management concerning functions
Next
From: Keith Worthington
Date:
Subject: Re: Help on Trigger functions