Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys
Date
Msg-id 4948CA3D.1030200@enterprisedb.com
Whole thread Raw
In response to BUG #4586: Supporting of Binary instead Bytea for Primary Keys  ("Miroslav Nachev" <miro@space-comm.com>)
List pgsql-bugs
Miroslav Nachev wrote:
> And how to specify that bytea MUST be exact 16 bytes?

Well, you could put a constraint on the column, or create a domain with
such a constraint. But if you're dealing with uuids, you really want to
use the UUID data type anyway.

> What about the speed
> because this is very important?
> 1st of all when the length is variable then the speed is low.

The overhead is small enough that you'd never notice.

> 2nd when the column is with bigger length which require pointer to the data
> instead data, then the speed will be extremely low.

Again you're just assuming some overhead that's completely insignificant
in the big scheme of things.

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

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys
Next
From: "Miroslav Nachev"
Date:
Subject: Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys