Re: Poor performance on very simple query ?

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: Poor performance on very simple query ?
Дата
Msg-id 4523EB18.4040408@logix-tt.com
обсуждение исходный текст
Ответ на Re: Poor performance on very simple query ?  (Tobias Brox <tobias@nordicbet.com>)
Список pgsql-performance
Hi, Tobias,

Tobias Brox wrote:

> How can you have a default value on a primary key?

Just declare the column with both a default value and a primary key
constraint.

It makes sense when the default value is calculated instead of a
constant, by calling a function that generates the key.

In fact, the SERIAL type does nothing but defining a sequence, and then
use nextval('sequencename') as default.

HTH,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

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

Предыдущее
От: Geoffrey
Дата:
Сообщение: Re: Unsubscribe
Следующее
От: Steve Peterson
Дата:
Сообщение: UPDATE becomes mired / win32