Serials: removing the holes? (consecutive) - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Serials: removing the holes? (consecutive)
Date
Msg-id 3D4B357F.1070704@mega-bucks.co.jp
Whole thread Raw
Responses Re: Serials: removing the holes? (consecutive)  (Masaru Sugawara <rk73@sea.plala.or.jp>)
List pgsql-general
Serials are a great datatype but when using them you sometimes get
non-consecutive numbers. I understand some of the reasons for this.

Is there a (simple) way to re-sequence a serial column that is the
primary key for a table so that the numbers are all consecutive?

I don't mnind having holes but once in a while I'd like to re-sequence
the table so that the current numbes in use become consecutive.

Just asking ...

Thanks!

Jc


pgsql-general by date:

Previous
From: Jean-Christian Imbeault
Date:
Subject: encrypted data types?
Next
From: Bruce Momjian
Date:
Subject: Re: encrypted data types?