Re: Implicit sequence with start value? - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Implicit sequence with start value?
Date
Msg-id 4A6C924E.70407@iol.ie
Whole thread Raw
In response to Re: Implicit sequence with start value?  (Clemens Eisserer <linuxhippy@gmail.com>)
List pgsql-general
On 26/07/2009 18:20, Clemens Eisserer wrote:
> What still puzzles me is how to get the sequence value applied.
> MySQL's auto_increment simply ignores whatever value is supplied to
> it, however postgres seems to insert the value instead of the next
> sequence value, if one is supplied:

That's because type SERIAL sets the column's *default* value to call
nextval() - so if you supply an explicit value, it will use that instead.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: Clemens Eisserer
Date:
Subject: Re: Implicit sequence with start value?
Next
From: Scott Marlowe
Date:
Subject: Re: Implicit sequence with start value?