Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group