Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] UUID's as primary keys

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Thomas Hallgren <thomas(at)tada(dot)se>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Psql_General <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] UUID's as primary keys
Date: 2006-06-29 15:07:28
Message-ID: 20060629150728.GE16792@svana.org (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
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. 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.

And for people that want char(1), they should be using "char", which
really is one byte (ex padding ofcourse).

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

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-06-29 15:27:07
Subject: Re: vacuum, performance, and MVCC
Previous:From: Hiroshi SaitoDate: 2006-06-29 14:52:46
Subject: Re: Compilatiuon of source code for windows

pgsql-general by date

Next:From: Jasbinder BaliDate: 2006-06-29 15:24:35
Subject: Database connectivity using a unix shell
Previous:From: Tino WildenhainDate: 2006-06-29 14:36:12
Subject: Re: Script for reading flat file without delimiters

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group