Using COPY for bulk upload in a table with sequence field

From: Gautam Saha <gsaha(at)imsa(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Subject: Using COPY for bulk upload in a table with sequence field
Date: 2005-01-18 23:43:51
Message-ID: 41ED9F37.6020403@imsa.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi:

Can I use COPY command to upload a flat text file into a PG table where
the PK column (item_id) is Serial type.
The table is an existing table with data and I want to
insert new rows from the flat file. The sequence already defined for
this column.

If I do not have the item_id data in my flat file, is it going to get the
id from nextval from the sequence?

Any help is appreciated.

Gautam

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Mayer 2005-01-19 00:49:18 Re: run httpd and postgresql on different machines ?
Previous Message Dick Davies 2005-01-18 21:23:02 Re: PAM ldap