Re: SEQUENCEs and NO MAXVALUE NO MINVALUE - Mailing list pgsql-patches

From Rod Taylor
Subject Re: SEQUENCEs and NO MAXVALUE NO MINVALUE
Date
Msg-id 1043291592.83856.225.camel@jester
Whole thread Raw
In response to Re: SEQUENCEs and NO MAXVALUE NO MINVALUE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Wed, 2003-01-22 at 20:37, Tom Lane wrote:
> Rod Taylor <rbt@rbt.ca> writes:
> > Adds in NO MAXVALUE and NO MINVALUE options for create sequence per 200X
> > spec, which will also make alter sequence a touch easier.
>
> What are these supposed to do exactly?  There is no such animal as a
> sequence that hasn't got a maxvalue, nor one without a minvalue.
> "Large" does not mean "unlimited".

6) Case:
 a) If <sequence generator maxvalue option> is specified, then Case:
  i) If NO MAXVALUE is specified, then let SMAX be an
implementation-defined <signed numeric literal> of declared type DT.
  ii) Otherwise, let SMAX be <sequence generator max value>.
 b) Otherwise, let SMAX be an implementation-defined <signed numeric
literal> of declared type DT.

7) Case:
 a) If <sequence generator minvalue option> is specified, then Case:
  i) If NO MINVALUE is specified, then let SMIN be an
implementation-defined <signed numeric literal> of declared type DT.
  ii) Otherwise, let SMIN be <sequence generator min value>.
 b) Otherwise, let SMIN be an implementation-defined <signed numeric
literal> of declared type DT.

> I'm not eager to pick up evidently-poorly-thought-out features from a
> draft spec that is nowhere near being frozen.

These 2 particular items are to spec, with the exception that we don't
stop at the limit of the datatype, int4's have int8 limits.

I think we need an ALTER SEQUENCE command, especially once dependencies
are fully tracked on them.  This will include some method of returning
to the defaults.

> Anyway, didn't we decide that converging syntax with 200X was a
> bad idea if we weren't going to converge semantics?

Too late for that.  The rest of the create sequence syntax is in-line
with the new spec, with the exception of the above 2 items.

--
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: SEQUENCEs and NO MAXVALUE NO MINVALUE
Next
From: Peter Eisentraut
Date:
Subject: Re: SEQUENCEs and NO MAXVALUE NO MINVALUE