Re: [GENERAL] looking for a globally unique row ID
| От | George Neuner |
|---|---|
| Тема | Re: [GENERAL] looking for a globally unique row ID |
| Дата | |
| Msg-id | f3fmrc5hr9t73otbqdgq9g98r8ahhhhkpk@4ax.com обсуждение исходный текст |
| Ответ на | [GENERAL] looking for a globally unique row ID (Rafal Pietrak <rafal@ztk-rp.eu>) |
| Список | pgsql-general |
On Thu, 14 Sep 2017 17:02:05 -0500, Merlin Moncure <mmoncure@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
В списке pgsql-general по дате отправления: