Re: identity columns ?

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: identity columns ?
Дата
Msg-id 1017959236.1427.6.camel@linda
обсуждение исходный текст
Ответ на identity columns ?  ("Chris" <chris@netlabz.com>)
Список pgsql-novice
On Thu, 2002-04-04 at 22:24, Chris wrote:
> Hello,
>
> Two questions -
>
> 1. M$ SQL Server has an identity column which generates a sequential number
> for you, we use this often for unique primary keys. Does postgres support
> anything like  this ?

We have the SERIAL datatype (an INTEGER field with an associated
sequence).

Don't use oids for referencing - they should be for database internal
use only.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "Thou will keep him in perfect peace, whose mind is
      stayed on thee, because he trusts in thee."
                                        Isaiah 26:3

Вложения

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

Предыдущее
От: Ugly Hippo
Дата:
Сообщение: Re: Transactions in Postgres
Следующее
От: "Chris"
Дата:
Сообщение: identity