From 5f65225fa37bd244ee5487448ac542b2b2f47296 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 20 Mar 2003 07:02:11 +0000 Subject: Todo items: Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values Also updated create sequence docs to mention NO MINVALUE, & NO MAXVALUE. New Files: doc/src/sgml/ref/alter_sequence.sgml src/test/regress/expected/sequence.out src/test/regress/sql/sequence.sql ALTER SEQUENCE is NOT transactional. It behaves similarly to setval(). It matches the proposed SQL200N spec, as well as Oracle in most ways -- Oracle lacks RESTART WITH for some strange reason. -- Rod Taylor --- doc/src/sgml/ref/create_sequence.sgml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'doc/src/sgml/ref/create_sequence.sgml') diff --git a/doc/src/sgml/ref/create_sequence.sgml b/doc/src/sgml/ref/create_sequence.sgml index a357e434e37..550605447fb 100644 --- a/doc/src/sgml/ref/create_sequence.sgml +++ b/doc/src/sgml/ref/create_sequence.sgml @@ -1,5 +1,5 @@ @@ -22,7 +22,7 @@ PostgreSQL documentation CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname [ INCREMENT [ BY ] increment ] - [ MINVALUE minvalue ] [ MAXVALUE maxvalue ] + [ MINVALUE minvalue | NO MINVALUE ] [ MAXVALUE maxvalue | NO MAXVALUE ] [ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ] @@ -63,7 +63,7 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname The - + clause is optional. A positive value will make an ascending sequence, a negative one a descending sequence. The default value is one (1). @@ -73,12 +73,14 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname minvalue + NO MINVALUE The optional clause determines the minimum value - a sequence can generate. The defaults are 1 and -2^63-1 for + a sequence can generate. If this clause is not supplied or + is specified, then defaults will be used. The defaults are 1 and -2^63-1 for ascending and descending sequences, respectively. @@ -86,13 +88,15 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE seqname maxvalue + NO MAXVALUE The optional clause determines the maximum - value for the sequence. The defaults are 2^63-1 and -1 for - ascending and descending sequences, respectively. + value for the sequence. If this clause is not supplied or + is specified, then default values will be used. + The defaults are 2^63-1 and -1 for ascending and descending sequences, respectively. @@ -101,7 +105,7 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE seqnamestart - The optional enables the sequence to begin anywhere. The default starting value is -- cgit v1.2.3