Re: serial, sequence, and COPY FROM

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Brandon Aiken <BAiken(at)winemantech(dot)com>
Cc: rloefgren(at)forethought(dot)net, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: serial, sequence, and COPY FROM
Date: 2006-09-12 19:11:28
Message-ID: 1158088288.1854.37.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2006-09-12 19:22:20 Re: serial, sequence, and COPY FROM
Previous Message Alvaro Herrera 2006-09-12 19:01:59 Re: serial, sequence, and COPY FROM