On Thu, 14 Sep 2017 17:02:05 -0500, Merlin Moncure
<mmonc...@gmail.com> wrote:

>... With sequences, the database *guarantees* that the
>identifier is unique with no exceptions; there never will be a unique
>value.  Can you give a hypothetical example of how you think they
>wouldn't work?

Jumping in here, but a month or so past someone here was complaining
about a restore resetting all the sequences in the database. Obviously
a strange situation [I've never seen it], but something to worry about
if you are relying on sequences for uniqueness.

Upthread I suggested the timestamp+counter approach.  I wasn't
thinking about this issue specifically, but it is immune to the
counter being reset [accidentally or otherwise].

George



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to