Re: TRUNCATE TABLE with IDENTITY
Boszormenyi Zoltan <zb@cybertec.at>
From: Zoltan Boszormenyi <zb@cybertec.at>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: "Decibel!" <decibel@decibel.org>, Simon Riggs <simon@2ndquadrant.com>, Steve Crawford <scrawford@pinpointresearch.com>, pgsql-hackers@postgresql.org
Date: 2008-04-22T15:19:11Z
Lists: 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/