When I select bytea
fields filled with binary data in my Postgres database using the HDBC-postgreSQL driver (version 2.3.2.3), they come out as:
SqlByteString "\x<hex representation of binary data>"
That is, it returns a ByteString
which contains a string containing \x
followed by the hex representation of my binary data. This is inconvenient, dreadfully inefficient and basically makes no sense to me.
Is there any reason why it doesn't return a SqlByteString
containing a byte string with the actual binary data inside it? Is there something I am missing, or how do I configure the driver to do that?
thanks