Re: Implicit sequence with start value?

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: Implicit sequence with start value?
Дата
Msg-id 4A6C924E.70407@iol.ie
обсуждение исходный текст
Ответ на Re: Implicit sequence with start value?  (Clemens Eisserer <linuxhippy@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Clemens Eisserer
Дата:
Сообщение: Re: Implicit sequence with start value?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Implicit sequence with start value?