www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to convert PostgreSQL bytea HEX value to byte[] ?

I need to extract binary blob from PostgreSQL. It's input/output 
by default work in hex mode.


I need to extract data and write them on FS as normal file (byte 
[] I suppose).

Here is my question on SO 

There I got suggestion to do:
  md.userblob = byteaToBytes(to!string(rs.getString(4)));

But as I understand after reading docs I am getting hex string 
and need convert it to byte[]
Apr 07 2016