Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART - Mailing list pgsql-bugs

From Alexsander Rosa
Subject Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Date
Msg-id AANLkTi=LFdGTCFMTGpbrOQzN-E-UzmVMGznbYkRujJD+@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Then the docs are misleading:
http://www.postgresql.org/docs/8.3/static/sql-altersequence.html

According the docs, 8.3 does NOT have a START clause -- only RESTART. I
think a START clause should raise an error at 8.3 servers; there's a chance
of someone run the command in several servers (like a pgdiff) and get
different behaviour for the same command.

2010/8/26 Tom Lane <tgl@sss.pgh.pa.us>

> "Alexsander" <alexsander.rosa@gmail.com> writes:
> > CREATE SEQUENCE foo;
> > SELECT setval('foo',12345);
> > ALTER SEQUENCE foo START WITH 10; -- can't change value
> > SELECT nextval('foo'); -- it's 10 instead of 12346
>
> > Apparently START is executing a RESTART.
>
> Yup.  That's what it's defined to do, pre-8.4.
>
>                        regards, tom lane
>



--=20
Atenciosamente,
Alexsander da Rosa
Linux User #113925

"Extremismo na defesa da liberdade n=E3o =E9 defeito.
Modera=E7=E3o na busca por justi=E7a n=E3o =E9 virtude."
-- Barry Goldwater

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Next
From: Tom Lane
Date:
Subject: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART