From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Jason Orendorff" <jason(at)jorendorff(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: storing binary data |
Date: | 2001-10-23 17:49:36 |
Message-ID: | 6115.1003859376@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Jason Orendorff" <jason(at)jorendorff(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Weinberg | 2001-10-23 17:59:32 | Re: Using an SMP machine to make multiple indices on the |
Previous Message | Thomas Lockhart | 2001-10-23 17:17:54 | Re: schema support, was Package support for Postgres |