On 1/6/06, Tom Lane <[EMAIL PROTECTED]> wrote:
> Marko Kreen <[EMAIL PROTECTED]> writes:
> > But my question is rather - is there any scenario where setval() should
> > go with nextval()?
> > It seems that their pairing is an accident and should be fixed.
> I think the original argument for the current design was that with
> enough nextval's you can duplicate the effect of a setval.  This is only
> strictly true if the sequence is CYCLE mode, and even then it'd take a
> whole lot of patience to wrap an int8 sequence around ... but the
> distinction between them is not so large as you make it out to be.

With bigserial this is more like CPU DoS, while other users can work

> In any case I think we are wasting our time discussing it, and instead
> should be looking through the SQL2003 spec to see what it requires.
> Bruce couldn't find anything in it about this but I can't believe the
> info isn't there somewhere.

Google tells that Oracle has ALTER and SELECT; DB2 has ALTER and USAGE.

I found SQL2003 pdf's too ... from my reading it has only USAGE.

page 724 -> General Rules -> #2
page 740 -> Syntax rules -> #3

Everything combined:
SELECT: currval
UPDATE: nextval
USAGE: currval, nextval
ALTER: setval



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to