Re: TRUNCATE TABLE with IDENTITY

Поиск
Список
Период
Сортировка
От Zoltan Boszormenyi
Тема Re: TRUNCATE TABLE with IDENTITY
Дата
Msg-id 480E01EF.5020503@cybertec.at
обсуждение исходный текст
Ответ на Re: TRUNCATE TABLE with IDENTITY  (Zoltan Boszormenyi <zb@cybertec.at>)
Ответы Re: TRUNCATE TABLE with IDENTITY  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Hi,

Zoltan Boszormenyi írta:
> Updated patch implements TRUNCATE ... RESTART IDENTITY
> which restarts all owned sequences for the truncated table(s).
> Regression tests updated, documentation added. pg_dump was
> also extended to output original[1] START value for creating SEQUENCEs.
>
> [1] For 8.3 and below I could only guesstimate it as MINVALUE for
> ascending
>      and MAXVALUE for descending sequences.
>
> Best regards,
> Zoltán Böszörményi

I just saw this on the CommitFest:May page:

"alvherre says: I'm not sure if this is the same patch in the previous
entry, or a different feature"

I wanted to clarify, the second patch contains two features.
1. stored start value for sequences, ALTER SEQUENCE ... RESTART;
2. (builds on 1.) TRUNCATE ... RESTART IDENTITY;

Best regards,
Zoltán Böszörményi

--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Regression test fails when BLCKSZ is 1kB
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Problem with server/utils/snapmgr.h