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

From: Alexsander Rosa <alexsander(dot)rosa(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Date: 2010-09-02 17:54:55
Message-ID: AANLkTikttCoSS8MJuK9m-g-HK4PxHXKCNz0TA=U=6e3S@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

What about the risk of using ALTER SEQUENCE ... START N in a mixed
environment? In the 8.4.x servers it will work as designed but in the 8.3.x
(and below) servers, instead of issuing an error it will CORRUPT the
sequence value without notice. I understand the point of keeping a
(mis)feature when it's harmless or at least not amibiguous, but this is not
the case here. While the 8.4 behavior -- the correct one -- is a mere
configuration of little consequence, the 8.3 (and below) behavior is an
unexpected RESET. I think it's safer to require the people that was using
old versions with the wrong spell to fix their code than put lots of users
of the current version in risk of using a potentially disastrous command --
when executed in previous versions. Should all 8.4.x (and beyond) users be
forced to check server version before issuing this command?

2010/9/1 Alvaro Herrera <alvherre(at)commandprompt(dot)com>

> Excerpts from Euler Taveira de Oliveira's message of mié sep 01 10:18:10
> -0400 2010:
> > Tom Lane escreveu:
> > > I'm not inclined to go and retroactively document that these spellings
> > > are possible but deprecated in the old branches. I think that would
> > > just confuse matters even more.
> >
> > Is it worth preventing that sloppy implementation in the old branches?
>
> That risks removing a (mis)feature that people are currently depending on.
>
> --
> Álvaro Herrera <alvherre(at)commandprompt(dot)com>
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>

--
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 Fabien COELHO 2010-09-02 18:34:46 Re: issue about information_schema REFERENTIAL_CONSTRAINTS
Previous Message Tom Lane 2010-09-02 17:43:40 Re: BUG #5639: Compile fails on heap