Re: serial, sequence, and COPY FROM - Mailing list pgsql-general

From Scott Marlowe
Subject Re: serial, sequence, and COPY FROM
Date
Msg-id 1158088288.1854.37.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: serial, sequence, and COPY FROM  ("Brandon Aiken" <BAiken@winemantech.com>)
List pgsql-general
On Tue, 2006-09-12 at 13:48, Brandon Aiken wrote:
> Serial fields have a default value of nextval, so if you add an 18th
> field to your text file with DEFAULT in every record it should work as
> intended.

Or you can use the

copy table (field1,field2,field3,...field18) from stdin;

syntax, and leave out the serial field from the list of columns.

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: serial, sequence, and COPY FROM
Next
From: Michael Fuhr
Date:
Subject: Re: serial, sequence, and COPY FROM