UUID's as primary keys - Mailing list pgsql-general

From Thomas Hallgren
Subject UUID's as primary keys
Date
Msg-id 44A2295D.7000709@tada.se
Whole thread Raw
Responses Re: UUID's as primary keys
List pgsql-general
I'm building an app where I have several entities that are identified
using a UUID (i.e. a 128 bit quantity). My current implementation uses a
composite primary key consisting of two int8 values. It's a bit
cumbersome and I would much rather have a distinct type. An earlier
implementation using Oracle mapped the UUID to a RAW(16) but PostgreSQL
doesn't have that and the BYTEA adds extra overhead.

What would be the best (as in most efficient) mapping for a 128 bit
primary key?

Regards,
Thomas Hallgren


pgsql-general by date:

Previous
From: Tim Allen
Date:
Subject: Re: TSearch vs. Homebrew
Next
From: Martijn van Oosterhout
Date:
Subject: Re: UUID's as primary keys