| From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
|---|---|
| To: | "Bruce Momjian" <bruce(at)momjian(dot)us> |
| Cc: | "Dawid Kuroczko" <qnex42(at)gmail(dot)com>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: RFD: hexstring(n) data type |
| Date: | 2008-04-17 23:55:30 |
| Message-ID: | 87k5iwavf1.fsf@oxford.xeocode.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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. Really I would prefer
if bytea were *always* read and written in hex format. We could have a guc to
enable this but it would make it hard to write code which would function
consistently as part of a larger application.
I think this is more akin to the MONEY data type. Really it would be better if
we could declare columns as NUMERIC but attach a "default format" to them for
use when string representation is desired. Similarly with bytea we could
choose a default string representation different from the default in/out
functions.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2008-04-17 23:56:16 | Re: DROP DATABASE vs patch to not remove files right away |
| Previous Message | Gregory Stark | 2008-04-17 23:45:25 | Re: Lessons from commit fest |