Re: Changes in serial / sequence introduced in Postgresql 10

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Changes in serial / sequence introduced in Postgresql 10
Дата
Msg-id 20180620020552.GB20245@paquier.xyz
обсуждение исходный текст
Ответ на Re: Changes in serial / sequence introduced in Postgresql 10  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
On Tue, Jun 19, 2018 at 02:49:08PM -0400, Bruce Momjian wrote:
> I don't think we realize there was a behavioral change here.  I think we
> were just trying to fix the case where the sequence maximum didn't match
> the serial maximum.  I am not sure if it is worth documenting it at this
> point though.

Yeah, I agree that it is not worth documenting it.  I don't recall
reviewing the full patch related to identity columns, but I surely
looked at patches which fixed post-commit bugs, and the new behavior is
as a whole more consistent as sequences created with serial map to the
real bound values associated with the underlying column type, and
bigserial does the same:
=# create table test (id bigserial primary key) ;
CREATE TABLE
=# select sequencename, max_value from pg_sequences;
 sequencename |      max_value
--------------+---------------------
 test_id_seq  | 9223372036854775807
(1 row)
--
Michael

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Changes in serial / sequence introduced in Postgresql 10
Следующее
От: Euler Taveira
Дата:
Сообщение: Re: postgresql 11 release notes