"Jason Orendorff" <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org