Gregory Stark <[EMAIL PROTECTED]> writes:
> However bytea has an inconvenient string representation. Really I would prefer
> if bytea were *always* read and written in hex format.
Yeah, the escaping rule is a mess: hard to work with and even less
storage-efficient than hex would be.
> We could ha
I don't think we should define types based on how they print. We should define
types based on what they contain. bytea is a perfectly good datatype for
storing binary data, though perhaps we could use a bytea(n) for fixed size
binary data.
However bytea has an inconvenient string representation.
I am confused how a hex type is any better than using the 'hex' decode()
format we already support:
test=> select decode('5476', 'hex');
decode
Tv
(1 row)
---
Dawid Kuroczk
Following the discussion on making UUID data type to be much more liberal
( http://archives.postgresql.org/pgsql-hackers/2008-02/msg01214.php )
I have decided to try to approach it from more general perspective.
The current state of code is available at:
http://qnex.net/hexstring-0.1-2008-03-03.tg