Re: [HACKERS] RFD: hexstring(n) data type

2008-04-17 Thread Tom Lane
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

Re: [HACKERS] RFD: hexstring(n) data type

2008-04-17 Thread Gregory Stark
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.

Re: [HACKERS] RFD: hexstring(n) data type

2008-04-17 Thread Bruce Momjian
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

[HACKERS] RFD: hexstring(n) data type

2008-03-03 Thread Dawid Kuroczko
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