Re: Changes in serial / sequence introduced in Postgresql 10 - Mailing list pgsql-docs

From Michael Paquier
Subject Re: Changes in serial / sequence introduced in Postgresql 10
Date
Msg-id 20180620020552.GB20245@paquier.xyz
Whole thread Raw
In response to Re: Changes in serial / sequence introduced in Postgresql 10  (Bruce Momjian <bruce@momjian.us>)
List 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

Attachment

pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Changes in serial / sequence introduced in Postgresql 10
Next
From: Euler Taveira
Date:
Subject: Re: postgresql 11 release notes