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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: BUG #2290: Incorrect sequence increment after backup/restore
Дата
Msg-id 200603060523.k265NSt17458@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2290: Incorrect sequence increment after backup/restore  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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@mamontov.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. +

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #2290: Incorrect sequence increment after backup/restore
Следующее
От: Klein Balázs
Дата:
Сообщение: Re: BUG #2301: xml2 library not running on the Win Pg 8.1