Thank-you for the thoughtful answers. I have updated my C library to return the binary data correctly. I note the restriction on not being able to retrieve different columns in different formats. I found that my perl DBI interface wasn't happy either with the 'escape' output format, so I changed bytea_output to 'hex', and DBD::Pg is also happy now (I also read that the hex format is more efficient). -- Jason Armstrong -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general