Re: BUG #2290: Incorrect sequence increment after backup/restore

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oleg Mamontov <oleg(at)mamontov(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2290: Incorrect sequence increment after backup/restore
Date: 2006-03-06 05:23:28
Message-ID: 200603060523.k265NSt17458@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Updated wording:

* %Disallow ALTER SEQUENCE changes for SERIAL sequences because pg_dump
does not dump the changes

---------------------------------------------------------------------------

Bruce Momjian wrote:
> Tom Lane wrote:
> > "Oleg Mamontov" <oleg(at)mamontov(dot)net> writes:
> > > If after CREATE TABLE with SERIAL column i'll change sequence increment to 2
> > > or some other value (with ALTER SEQUENCE) then always work correctly (all
> > > inserted rows will have values incremented by 2).
> >
> > We currently consider that a serial column is a "black box" and you
> > should not mess with its underlying sequence directly. If you want
> > nondefault properties for the sequence, create it as an independent
> > sequence object and then just declare the column as "integer
> > default nextval('seq')".
>
> Added to TODO:
>
> * %Disallow changing sequence characteristics like INCREMENT for
> SERIAL columns
>
> --
> Bruce Momjian http://candle.pha.pa.us
> SRA OSS, Inc. http://www.sraoss.com
>
> + If your life is a hard drive, Christ can be your backup. +
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Pivovarov 2006-03-06 11:03:24 BUG #2302: \d command gets double quoted table name in error message - ""table_name""
Previous Message Bruce Momjian 2006-03-06 05:16:37 Re: BUG #2290: Incorrect sequence increment after backup/restore