Re: [GENERAL] UUID's as primary keys

From: Thomas Hallgren <thomas(at)tada(dot)se>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] UUID's as primary keys
Date: 2006-06-29 16:40:13
Message-ID: 44A4026D.40305@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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.

> What I'm saying is that it's
> easier to create new fixed length types for the cases that need it,
> than it is to redo the entire type handling of the backend.
>
>
Of course. But it's a matter of who does what. Your reasoning push the
burden to the users.

Regards,
Thomas Hallgren

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-06-29 16:40:49 Re: Database connectivity using a unix shell
Previous Message Jim C. Nasby 2006-06-29 16:32:56 Re: Fixed length datatypes. WAS [GENERAL] UUID's as

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-29 16:41:29 Re: Index corruption
Previous Message Tom Lane 2006-06-29 16:35:12 Re: Single Index Tuple Chain (SITC) method