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

From: Alexsander Rosa <alexsander(dot)rosa(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Date: 2010-08-27 13:21:45
Message-ID: AANLkTinAoCoc6u3m0Ya=iyTCfboitdVnRpu32xSfMCay@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

---------- Forwarded message ----------
From: Alexsander Rosa <alexsander(dot)rosa(at)gmail(dot)com>
Date: 2010/8/27
Subject: Re: [BUGS] BUG #5629: ALTER SEQUENCE foo START execute a RESTART
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

Let me get this straight: in version 8.3 the ALTER SEQUENCE command has an
*undocumented* [1] clause START that is actually an alias for RESTART (i.e.
both reset the sequence value to the value passed by the mandatory
argument). In version 8.4 this behavior was *changed* and, according the
docs [2], START now changes the "default start value" that will be used by
subsequent calls of ALTER SEQUENCE ... RESTART without argument (which is
not mandatory anymore). Is this correct?

Is the 8.3 behavior of ALTER SEQUENCE ... START clause as an alias to
RESTART a known bug (or unintended feature) than cannot be corrected because
it's a stable branch? Who would be using an undocumented buggy clause,
anyway? If it's not being considered a bug, or if it's not going to be
fixed, I think the docs should at least mention this oddity.

[1] http://www.postgresql.org/docs/8.3/static/sql-altersequence.html
[2] http://www.postgresql.org/docs/8.4/static/sql-altersequence.html

2010/8/26 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Alexsander Rosa <alexsander(dot)rosa(at)gmail(dot)com> writes:
>
> > 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.
>
> We're not going to change the behavior like that in stable branches...
>
> 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

--
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 tbz 2010-08-27 14:56:48 BUG #5630: CREATE INDEX does not use schema search path
Previous Message Marko Tiikkaja 2010-08-26 22:25:29 Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART