On 11/26/15 1:12 AM, Francisco Olarte wrote:
> Anyway, I think people should be told to respect types, and people
> should be teach that strings are sequences of characters, that to do
> what people think is 'hex encoding' ( two digits per*byte*, no
> delimiter ), you need to first transform the string to bytes, then
> hex-encode that.
BTW, it wouldn't be that difficult to create a hex data type that worked
like bytea but accepted only hex strings. Likewise for a base64 type.
Only downside is you'd probably have to do it in C, because no other
language can handle cstring and I don't think there's any built-in
conversion functions with the correct parameters.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com