From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alexsander Rosa <alexsander(dot)rosa(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART |
Date: | 2010-08-27 15:11:29 |
Message-ID: | 29850.1282921889@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Alexsander Rosa <alexsander(dot)rosa(at)gmail(dot)com> writes:
> 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).
Yeah. I just looked at the old code a bit. This behavior was an
artifact of a sloppy implementation: internally, CREATE SEQUENCE ...
START WITH x did the same thing as ALTER SEQUENCE ... RESTART WITH x, so
the code didn't prevent you from using either spelling in either place.
But it wasn't documented or intended that you should write CREATE
SEQUENCE RESTART or ALTER SEQUENCE START.
As of 8.4 ALTER SEQUENCE START has an actually designed meaning, which
is different from ALTER SEQUENCE RESTART. This wasn't documented as an
incompatibility because the syntax wasn't supposed to exist at all
before that.
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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-08-27 18:25:48 | Re: BUG #5630: CREATE INDEX does not use schema search path |
Previous Message | tbz | 2010-08-27 14:56:48 | BUG #5630: CREATE INDEX does not use schema search path |