summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-04-04 12:36:15 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-04-04 12:49:39 -0400
commit60a0b2ec8943451186dfa22907f88334d97cb2e0 (patch)
tree4be14644f7a4ce42f4300ef7b5cd134d3f4251d2 /doc/src
parenta9a7949134189c29a9b38ac7394c53849684fe4d (diff)
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>
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_sequence.sgml13
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/alter_sequence.sgml b/doc/src/sgml/ref/alter_sequence.sgml
index 252a668189b..5c912ab892d 100644
--- a/doc/src/sgml/ref/alter_sequence.sgml
+++ b/doc/src/sgml/ref/alter_sequence.sgml
@@ -94,10 +94,15 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S
</para>
<para>
- Note that changing the data type does not automatically change the
- minimum and maximum values. You can use the clauses <literal>NO
- MINVALUE</literal> and <literal>NO MAXVALUE</literal> to adjust the
- minimum and maximum values to the range of the new data type.
+ Changing the data type automatically changes the minimum and maximum
+ values of the sequence if and only if the previous minimum and maximum
+ values were the minimum or maximum value of the old data type (in
+ other words, if the sequence had been created using <literal>NO
+ MINVALUE</literal> or <literal>NO MAXVALUE</literal>, implicitly or
+ explicitly). Otherwise, the minimum and maximum values are preserved,
+ unless new values are given as part of the same command. If the
+ minimum and maximum values do not fit into the new data type, an error
+ will be generated.
</para>
</listitem>
</varlistentry>