Re: [GENERAL] 9.6.1: INSERT with PK as serial - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] 9.6.1: INSERT with PK as serial
Date
Msg-id CAKFQuwbviNoDK=vdkqJhvB5UeSebiQ3FReZWtQkPPs4_G8Djvw@mail.gmail.com
Whole thread Raw
In response to [GENERAL] 9.6.1: INSERT with PK as serial  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: [GENERAL] 9.6.1: INSERT with PK as serial
List pgsql-general
On Monday, January 16, 2017, Rich Shepard <rshepard@appl-ecosys.com> wrote:
  I have a table with the primary key type of serial. The initial data load
has 40 lines, and each has a value for every column including sequential
integers from 1 through 40 for the data. 

Without any special effort on your part the first 40 records you try to insert using the default sequence are now going to fail with duplicate key errors.

David J. 

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: [GENERAL] 9.6.1: INSERT with PK as serial [FIXED]
Next
From: Rich Shepard
Date:
Subject: Re: [GENERAL] 9.6.1: INSERT with PK as serial