Re: [GENERAL] UUID's as primary keys - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: [GENERAL] UUID's as primary keys
Date
Msg-id 20060629164717.GF16792@svana.org
Whole thread Raw
In response to Re: [GENERAL] UUID's as primary keys  (Thomas Hallgren <thomas@tada.se>)
Responses Re: [GENERAL] UUID's as primary keys
List pgsql-hackers
On Thu, Jun 29, 2006 at 06:40:13PM +0200, Thomas Hallgren wrote:
> Martijn van Oosterhout wrote:
> >On Thu, Jun 29, 2006 at 03:54:36PM +0200, Thomas Hallgren wrote:
> >
> >>I have to concur with this. Assume you use a bytea for a UUID that in
> >>turn is used as a primary key. The extra overhead will be reflected in
> >>all indexes, all foreign keys, etc. In a normalized database some tables
> >>may consist of UUID columns only.
> >>
> >
> >So you create a UUID type. It's cheap enough to create new types after
> >all, that's one of postgresql's strengths.
> It would be a whole lot easier if I could use a domain.

It seems to me that maybe the backend should include a 16-byte fixed
length object (after all, we've got 1, 2, 4 and 8 bytes already) and
then people can use that to build whatever they like, using domains,
for example...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Index corruption
Next
From: Hannu Krosing
Date:
Subject: Re: Single Index Tuple Chain (SITC) method