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

Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Miroslav Nachev <miro(at)space-comm(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys
Date: 2008-12-17 08:17:41
Message-ID: 4948B5A5.7010309@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Miroslav Nachev wrote:
> Most of the popular databases (Oracle, MySQL, MS SQL, etc.) support binary
> column type which can be used as primary key. For example UUID algorithm
> need of exact 16 bytes and is very useful for Primary Key. Of course it can
> be presented with characters in Hex format but in that case this will take
> 32 bytes which is 2 times bigger.
> It will be very helpful if in PostgreSQL binary/varbinary type is supported
> and can be used for indexes and primary keys.

There's a built-in UUID datatype that you might be interested in. It's 
16 bytes, fixed-length.

Also, what's wrong with bytea?

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-bugs by date

Next:From: Miroslav NachevDate: 2008-12-17 09:14:29
Subject: Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys
Previous:From: Miroslav NachevDate: 2008-12-17 07:30:18
Subject: BUG #4586: Supporting of Binary instead Bytea for Primary Keys

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