Re: Filling Missing Primary Key Values - Mailing list pgsql-general

From Rich Shepard
Subject Re: Filling Missing Primary Key Values
Date
Msg-id alpine.LNX.2.00.1108111317530.14240@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Filling Missing Primary Key Values  (Steve Atkins <steve@blighty.com>)
List pgsql-general
On Thu, 11 Aug 2011, Steve Atkins wrote:

> This will fail if any of the existing values are integers in the range that
> you're inserting - and it may fail in the future, as you add new records
> if they clash with existing entries.

Steve/Chris/Dave:

   I had not looked in deatil at that column before. Having just done this, I
see that it's really a laboratory number, not a unique sample ID. So, I
renamed sample_id to lab_nbr, added a sample_id column, created the sequence
sample_id_seq, updated the table with it, then added the constraint that
sample_id is the primary key.

   Thank you all very much!

Rich

pgsql-general by date:

Previous
From: Geoffrey Myers
Date:
Subject: Re: is max connections in a database table somewhere
Next
From: Naoko Reeves
Date:
Subject: Regex Query Index question