pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gautam Saha <gsaha@imsa.edu>
To: pgsql-admin@postgresql.org
Subject: Using COPY for bulk upload in a table with sequence field
Date: Tue, 18 Jan 2005 17:43:51 -0600
Message-ID: <41ED9F37.6020403@imsa.edu> (raw)

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





view thread (2+ messages)  latest in thread

Message-ID: <41ED9F37.6020403@imsa.edu>
Permalink:  ../41ED9F37.6020403@imsa.edu/
Also on:    postgresql.org/message-id/41ED9F37.6020403@imsa.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: gsaha@imsa.edu
  Subject: Re: Using COPY for bulk upload in a table with sequence field
  In-Reply-To: <41ED9F37.6020403@imsa.edu>
  References: <41ED9F37.6020403@imsa.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox