Re: Inserting preset values into a serial column - Mailing list pgsql-novice

From Tim Landscheidt
Subject Re: Inserting preset values into a serial column
Date
Msg-id m37hkovkwh.fsf@passepartout.tim-landscheidt.de
Whole thread Raw
In response to Inserting preset values into a serial column  (Michael Rowan <mike.rowan@internode.on.net>)
List pgsql-novice
Michael Rowan <mike.rowan@internode.on.net> wrote:

> PostgreSQL 8.4.4.1

> Can someone pls confirm that, provided I am doing it right, I can insert a row into a table where the primary key is
serialNOT NULL and a (unique) value is provided in the offered data?  I cannot see an answer to this specific point in
thedocs. 

Sure, just try it. You only need to make sure that after
your insertion the corresponding sequence will not collide
with your data, e. g., you will have to setval() the se-
quence to MAX(value) (+ 1?).

Tim

pgsql-novice by date:

Previous
From: Michael Rowan
Date:
Subject: Inserting preset values into a serial column
Next
From: Frank Bax
Date:
Subject: Re: SELECT counts