Re: looking for a globally unique row ID

From: George Neuner <gneuner2(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: looking for a globally unique row ID
Date: 2017-09-14 08:57:44
Message-ID: augkrcdir5iqrvrsrmkc1n476k0f9f0q9a@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 14 Sep 2017 09:45:59 +0200, Rafal Pietrak <rafal(at)ztk-rp(dot)eu>
wrote:

>Hello everybody,
>
>Can anybody help me find a way to implement an ID which:
>
>1. guarantees being unique across multiple tables.
>
>2. guarantees its uniqueness not only during INSERT, but also during the
>lifetime of the database/application (e.i. during future UPDATES).
>
>3. guarantees persistence of value across database backup/restore/upgrade.

UUID is the obvious choice, but it does take a lot of space.

Something like this might do the job:
http://rob.conery.io/2014/05/28/a-better-id-generator-for-postgresql/

George

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Northcott 2017-09-14 11:30:58 How to add new Collation language
Previous Message Frank Millman 2017-09-14 08:14:14 a JOIN to a VIEW seems slow