Re: serial data type

Поиск
Список
Период
Сортировка
От Doug McNaught
Тема Re: serial data type
Дата
Msg-id 874qlmq6vv.fsf@asmodeus.mcnaught.org
обсуждение исходный текст
Ответ на serial data type  (Tom Allison <tallison@tacocat.net>)
Ответы Re: serial data type
Список pgsql-general
Tom Allison <tallison@tacocat.net> writes:

> Can I use the serial data type in lieu of an 'auto_number' field?

What are the exact semantics of an "auto_number" field?

> I asked something like this some months ago and it seems that
> auto_number fields were addressed through a combination of triggers
> and procedures to ensure that there were do duplicate KEYS generated.
>
> Is it realistic to use the serial data type as a KEY?

Lots and lots of people do.  If you're just looking for a unique key
column for a single table, it works fine.

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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SMgrRelation hashtable corrupted
Следующее
От: Tom Allison
Дата:
Сообщение: Re: serial data type