Re: duplicate key violates unique constraint

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: duplicate key violates unique constraint
Дата
Msg-id 7D0DBA1F-6A76-4BEE-B2D5-193180F7B8C3@decibel.org
обсуждение исходный текст
Ответ на Re: duplicate key violates unique constraint  (Carol Walter <walterc@indiana.edu>)
Ответы Re: duplicate key violates unique constraint  (Carol Walter <walterc@indiana.edu>)
Список pgsql-admin
On May 10, 2007, at 9:01 AM, Carol Walter wrote:
> And this is more than a question than an answer, but I thought that
> sequences had to designated as data type "serial."

Nope... sequences are actually completely un-related to tables. You
can define a sequence that's not referenced by any table. The serial
data type is essentially a 'macro' that:

Creates a sequence
Sets the default value for the field to be the nextval() of that
sequence
Sets the field to be NOT NULL
--
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)



В списке pgsql-admin по дате отправления:

Предыдущее
От: Steve Holdoway
Дата:
Сообщение: Re: upgrade 8.0.3 -> 8.2.4
Следующее
От: Carol Walter
Дата:
Сообщение: Re: duplicate key violates unique constraint