Re: auto_increment

Поиск
Список
Период
Сортировка
От
Тема Re: auto_increment
Дата
Msg-id 65456.66.212.203.144.1064043923.squirrel@$HOSTNAME
обсуждение исходный текст
Ответ на auto_increment  ("Muhyiddin A.M Hayat" <middink@indo.net.id>)
Список pgsql-sql
> How to Create auto_increment field in PostreSQL.

Its called the SERIAL datatype:

create table test_table ( field1 serial,
constraint test_table_pkey primary key (field1));

> Can I create them using Trigger.

Yes, alternatively, but I'm told that is not recommended because the
server source code that manages the special sequence table is highly
optimized for this specific functionality.

~Berend Tober





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

Предыдущее
От: Jean-Michel Chabanne
Дата:
Сообщение: Re: [ADMIN] Error with functions
Следующее
От: Andrew Milne
Дата:
Сообщение: Unique Constraint Based on Date Range