Re: UUID as primary key

From: Vance Maverick <vmaverick(at)pgp(dot)com>
To: Harald Armin Massa <haraldarminmassa(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UUID as primary key
Date: 2006-08-22 14:49:26
Message-ID: 1156258166.22672.6.camel@vmaverick-linux2.pgp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for the good suggestion. I spent some time last night verifying
that it works, and that I can get the values in and out correctly
through JDBC. (When going from Java to the database, for example, it's
easiest to compose the value directly into the SQL query rather than
using a parameter.) This seems quite viable.

Vance

On Tue, 2006-08-22 at 08:44 +0200, Harald Armin Massa wrote:
> Vance,
>
> I use UUID as PK/FK within a rather complex application. To store it I
> use the type INET, which fits quite well.
>
> Compared to sequences I know of some disadvantages:
> - theoretical: keys are less locally distributed
> - bigger keys = more memory usage
> - manually editing of tables is difficult, just because the keys are
> more difficult to compare visually
>
> Harald
>
> --
> GHUM Harald Massa
> persuadere et programmare
> Harald Armin Massa
> Reinsburgstraße 202b
> 70197 Stuttgart
> 0173/9409607
> -
> Let's set so double the killer delete select all.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2006-08-22 15:07:19 Re: Queries joining views
Previous Message Tom Lane 2006-08-22 14:48:07 Re: Queries joining views