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

Поиск
Список
Период
Сортировка
От Miroslav Nachev
Тема Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys
Дата
Msg-id fdd50acd0812170114s28985cfcuca49bb5dd18a830b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys  (Kris Jurka <books@ejurka.com>)
Список pgsql-bugs
Dear Heikki,

Thank you very much. How can I map PostgreSQL UUID to JPA Hibernate with
annotations? Serializable or BigInteger or byte[] or java.util.UUID?

The big disadvantage of bytea is that it is not possible to use that type in
indexes and primary keys. Probably this restriction is because is very slow
column type because instead to keep the data this column keeps pointer to
the data.


Miro.


On Wed, Dec 17, 2008 at 10:17 AM, Heikki Linnakangas <
heikki.linnakangas@enterprisedb.com> wrote:

> 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
>

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys
Следующее
От: "Miroslav Nachev"
Дата:
Сообщение: Re: BUG #4586: Supporting of Binary instead Bytea for Primary Keys