Re: Importing data... (fwd)

From: harrold(at)sage(dot)che(dot)pitt(dot)edu
To: Chadwick Rolfs <c2304182(at)webdevel(dot)urban(dot)csuohio(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Importing data... (fwd)
Date: 2001-05-24 18:32:00
Message-ID: Pine.LNX.4.21.0105241419010.9208-100000@sage.che.pitt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, 24 May 2001, Chadwick Rolfs wrote:

> Right, so I just create the empty tables, or put in the primary keys, then
> I can use copy?
> -- OR is there a way to get postgresql to make the tables
> for me according to the CSV file???
> That's what I'm really after.
>
> Chadwick Rolfs
>

i think the copy command acts just like the insert command when it comes
to keys. so you create the table with the attrubutes found in the
cvs. then you use the copy command to insert the data. i think the
corresponding column in the text file will be copied into the key field,
and not generated automatically. although i'm not too sure on the last
part.

you could create a 3 column table with some sample data and try it out.

--
john
Give a man a fish, he owes you one fish.
Teach a man to fish, you give up your monopoly on fisheries.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tatsuo Ishii 2001-05-25 01:02:51 Re: Charset and encoding
Previous Message Chadwick Rolfs 2001-05-24 17:47:36 Re: Importing data... (fwd)