Re: [GENERAL] interesting! a sequence clashes with data already in that table

2004-10-08 Thread Bruno Wolff III
On Fri, Oct 08, 2004 at 03:00:07 -0700, Miles Keaton <[EMAIL PROTECTED]> wrote: > I thought Postgres would be smart enough to make the clients_id_seq > skip existing numbers, but I guess not! It wouldn't be very efficient to do that. > Do I, instead, have to be smart enough to set the sequence

[GENERAL] interesting! a sequence clashes with data already in that table

2004-10-08 Thread Miles Keaton
Here's an interesting problem! When a sequence clashes with data already in that table: CREATE TABLE clients ( id serial NOT NULL PRIMARY KEY UNIQUE, name varchar(64)); -- import OLD clients, with their original ID#... INSERT INTO clients VALUES (3, 'Dave'); INSERT INTO clients VALUES (4, 'Sally