Re: [GENERAL] Is there an auto incrementing number field?

Поиск
Список
Период
Сортировка
От Christian Rudow
Тема Re: [GENERAL] Is there an auto incrementing number field?
Дата
Msg-id 3771D6BB.49FD27E@thinx.ch
обсуждение исходный текст
Ответ на Is there an auto incrementing number field?  ("Robert Chalmers" <robert@chalmers.com.au>)
Список pgsql-general
Robert Chalmers wrote:

> I'm looking through the 6.5 specs, and wondering if there is an
> Auto-Incrementing field in this release?
>
> of if not, is there a way of achieving this end? So that as I add a new
> record to a table, it's '#ID' for example is automatically added. 1, 2, 3,
> 4,... and so on

Im using "create sequence ...." on INTEGER id's.
You can also use SERIAL constraint (which does the same thing).

Try pgaccess to have a look at the current state of your sequences.
Nice.

Chris
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Christian Rudow                 E-Mail: Christian.Rudow@thinx.ch
ThinX networked business services    Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

Предыдущее
От: "Robert Chalmers"
Дата:
Сообщение: Re: [GENERAL] Is there an auto incrementing number field?
Следующее
От: hkkang
Дата:
Сообщение: [Question] ShmemCreate:cannot create region