On Fri, Jan 11, 2008 at 11:43:54AM -0500, James B. Byrne wrote:
> My question is this: Can one assign an id number to a sequenced key column
> on create and override the sequencer?  If one does this then can and, if
> so, how does the sequencer in Postgresql handle the eventuality of running
> into a block of keys holding previously assigned numbers?

You can set the counter during create, or at any time later. However,
the counter is not defined by the column as such and will happily
return numbers already in the table if you screw it up.

The usual process is to insert normally when loading the data and then
do a setval() on the sequence to past the values already stored.

Have a nice day,
-- 
Martijn van Oosterhout   <[EMAIL PROTECTED]>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution 
> inevitable.
>  -- John F Kennedy

Attachment: signature.asc
Description: Digital signature

Reply via email to