Re: Questions about SERIAL type - Mailing list pgsql-hackers

From Doug McNaught
Subject Re: Questions about SERIAL type
Date
Msg-id m3n116mpo1.fsf@belphigor.mcnaught.org
Whole thread Raw
In response to Questions about SERIAL type  (reina@nsi.edu (Tony Reina))
List pgsql-hackers
"G. Anthony Reina" <reina@nsi.edu> writes:

> Now that I look at the CREATE SEQUENCE documentation, it appears to
> have a CYCLE flag which wraps the sequence around if it were to
> reach the MAXVALUE. Does anyone know if it wraps around to the next
> unused value? Or, if an index already exists at SERIAL value =
> MINVALUE, then will the INSERT get an error about duplicate
> insertions?

SERIAL columns get a unique index defined, so you'd get an error. 

-Doug
-- 
Let us cross over the river, and rest under the shade of the trees.  --T. J. Jackson, 1863


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Questions about SERIAL type
Next
From: Ned Wolpert
Date:
Subject: Re: Questions about SERIAL type