Re: Changes in serial / sequence introduced in Postgresql 10

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Pantelis Theodosiou <ypercube(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Changes in serial / sequence introduced in Postgresql 10
Date: 2018-06-20 02:05:52
Message-ID: 20180620020552.GB20245@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Euler Taveira 2018-06-20 02:20:44 Re: postgresql 11 release notes
Previous Message Bruce Momjian 2018-06-19 18:49:08 Re: Changes in serial / sequence introduced in Postgresql 10