pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Bruce Momjian <bruce@momjian.us>
Cc: Pantelis Theodosiou <ypercube@gmail.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Changes in serial / sequence introduced in Postgresql 10
Date: Wed, 20 Jun 2018 11:05:52 +0900
Message-ID: <20180620020552.GB20245@paquier.xyz> (raw)
In-Reply-To: <20180619184908.GF3637@momjian.us>
References: <CAE3TBxz4BkhcvYwCxtRpQyqu5NVjMAxgun5vhasM5C+kDcuCRA@mail.gmail.com>
	<CAE3TBxzpRJFF1QhKiEy6ryvgpQwituGbUDqSzi00w-WU7FtRfA@mail.gmail.com>
	<20180619184908.GF3637@momjian.us>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (3+ messages)

Message-ID: <20180620020552.GB20245@paquier.xyz>
Permalink:  ../20180620020552.GB20245@paquier.xyz/
Also on:    postgresql.org/message-id/20180620020552.GB20245@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: michael@paquier.xyz, bruce@momjian.us, ypercube@gmail.com
  Subject: Re: Changes in serial / sequence introduced in Postgresql 10
  In-Reply-To: <20180620020552.GB20245@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox