Re: 9.6.1: INSERT with PK as serial

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: 9.6.1: INSERT with PK as serial
Date: 2017-01-17 00:51:57
Message-ID: CAKFQuwbviNoDK=vdkqJhvB5UeSebiQ3FReZWtQkPPs4_G8Djvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday, January 16, 2017, Rich Shepard <rshepard(at)appl-ecosys(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2017-01-17 01:11:15 Re: 9.6.1: INSERT with PK as serial
Previous Message Rich Shepard 2017-01-17 00:45:16 Re: 9.6.1: INSERT with PK as serial [FIXED]