Re: auto fill serial id field with default value in copy operation - Mailing list pgsql-general

From Tom Lane
Subject Re: auto fill serial id field with default value in copy operation
Date
Msg-id 29409.1287783071@sss.pgh.pa.us
Whole thread Raw
In response to auto fill serial id field with default value in copy operation  ("karsten vennemann" <karsten@terragis.net>)
Responses Re: auto fill serial id field with default value in copy operation  ("karsten vennemann" <karsten@terragis.net>)
List pgsql-general
"karsten vennemann" <karsten@terragis.net> writes:
> What is the best way to load my data via copy into the db and get the record_id field auto filled (with the next id
valuein squence) ? 

You have to omit the column from the copy data altogether, and then
list just the columns that are supplied in the data in the COPY command's
column list.

            regards, tom lane

pgsql-general by date:

Previous
From: "karsten vennemann"
Date:
Subject: auto fill serial id field with default value in copy operation
Next
From: Gary Chambers
Date:
Subject: Re: Solaris install - "cannot compute sizeof (off_t)" error - readline issue?