sequence data type

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема sequence data type
Дата
Msg-id 898deb94-5265-37cf-f199-4f79ef864536@2ndquadrant.com
обсуждение исходный текст
Ответы Re: sequence data type  (Vik Fearing <vik@2ndquadrant.fr>)
Re: [HACKERS] sequence data type  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
Here is a patch that adds the notion of a data type to a sequence.  So
it might be CREATE SEQUENCE foo AS integer.  The types are restricted to
int{2,4,8} as now.

The main point of this is to make monitoring sequences less complicated.
 Right now, a serial column creates an int4 column but creates the
sequence with a max value for int8.  So in order to correctly answer the
question, is the sequence about to run out, you need to look not only at
the sequence but also any columns it is associated with.  check_postgres
figures this out, but it's complicated and slow, and not easy to do
manually.

If you tell the sequence the data type you have in mind, it
automatically sets appropriate min and max values.  Serial columns also
make use of this, so the sequence type automatically matches the column
type.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: ICU integration
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: ICU integration