Re: storing binary data

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: storing binary data
Дата
Msg-id 6115.1003859376@sss.pgh.pa.us
обсуждение исходный текст
Ответ на storing binary data  ("Jason Orendorff" <jason@jorendorff.com>)
Список pgsql-hackers
"Jason Orendorff" <jason@jorendorff.com> writes:
> Hi.  I was surprised to discover today that postgres's
> character types don't support zero bytes.  That is,
> Postgres isn't 8-bit clean.  Why is that?

(a) because all our datatype I/O interfaces are based on C-style   (null terminated) strings

(b) because comparison of character datatypes is based on strcoll()   (at least if you compiled with locale support)

Fixing either of these is far more pain than is justified to allow
people to store non-textual data in textual datatypes.  I don't foresee
it happening.

>  + What I really need is a binary *short* object type.
>    I have heard rumors of a legendary "bytea" type that might
>    help me, but it doesn't appear to be documented anywhere,
>    so I hesitate to use it.

It's real and it's not going away.  It is pretty poorly documented
and doesn't have a wide variety of functions ... but hey, you can help
improve that situation.  This is an open source project after all ;-)
        regards, tom lane


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

Предыдущее
От: Roland Roberts
Дата:
Сообщение: Re: Is there no "DESCRIBE ;" on PGSQL? help!!!
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: LOCK ROW SHARE MODE