Re: UUID column as pimrary key?

From: David Wall <d(dot)wall(at)computer(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: UUID column as pimrary key?
Date: 2011-01-04 19:16:52
Message-ID: 4D237224.2010800@computer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We're using UUID for primary keys in PG 8.4 without any issues. I have
no real insights into the details or performance issues, but always
figured it was stored as a binary 128-bit value, but with added benefits
of being able to enter and view them using a standard string format. We
don't sort them as they have no real meaning for us.

On 1/4/2011 11:07 AM, Dennis Gearon wrote:
> I haven't been able to find anywhere, easily, in the documentation using google
> where a list of allowed data types for primary keys is.
>
> So, UUIDs can be primary keys?
> Any issues wtih them on sorting or paging of index tables, etc.?
>
> Also, the documentation says that UUIDs are 128 bit value, but never explicitly
> says that's how it's stored. Nor does it use one of the nice, blue headered
> tables for UUID (or ENUM) showing storage and other attributes as it does for
> numeric, character,boolean, date/time, binary, monetary, geometric, or network
> types.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2011-01-04 19:24:30 Re: UUID column as pimrary key?
Previous Message Dennis Gearon 2011-01-04 19:07:00 UUID column as pimrary key?