pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Adjust min/max values when changing sequence type
Date: Tue, 04 Apr 2017 16:51:36 +0000
Message-ID: <E1cvRg8-0000XG-8P@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Adjust min/max values when changing sequence type

When changing the type of a sequence, adjust the min/max values of the
sequence if it looks like the previous values were the default values.
Previously, it would leave the old values in place, requiring manual
adjustments even in the usual/default cases.

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Reviewed-by: Vitaly Burovoy <vitaly.burovoy@gmail.com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/60a0b2ec8943451186dfa22907f88334d97cb2e0

Modified Files
--------------
doc/src/sgml/ref/alter_sequence.sgml   | 13 ++++++----
src/backend/commands/sequence.c        | 43 ++++++++++++++++++++++++++--------
src/test/regress/expected/sequence.out | 40 +++++++++++++++++++++++++++----
src/test/regress/sql/sequence.sql      | 22 ++++++++++++++---
4 files changed, 96 insertions(+), 22 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1cvRg8-0000XG-8P@gemulon.postgresql.org>
Permalink:  ../E1cvRg8-0000XG-8P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cvRg8-0000XG-8P@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: pgsql: Adjust min/max values when changing sequence type
  In-Reply-To: <E1cvRg8-0000XG-8P@gemulon.postgresql.org>
  References: <E1cvRg8-0000XG-8P@gemulon.postgresql.org>

* 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