Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART

From: Alexsander Rosa <alexsander(dot)rosa(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Date: 2010-08-26 21:40:17
Message-ID: AANLkTi=LFdGTCFMTGpbrOQzN-E-UzmVMGznbYkRujJD+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)us>

> "Alexsander" <alexsander(dot)rosa(at)gmail(dot)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
>

--
Atenciosamente,
Alexsander da Rosa
Linux User #113925

"Extremismo na defesa da liberdade não é defeito.
Moderação na busca por justiça não é virtude."
-- Barry Goldwater

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-08-26 21:51:17 Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Previous Message Tom Lane 2010-08-26 21:23:11 Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART