On Tue, Feb 08, 2011 at 11:39:04AM +0100, Michael wrote:
> I'm trying to view text data stored by OpenSIPS 1.6.4 (the latest)
> as BLOB
I take it you mean BYTEA.
> and PostgreSQL is displaying it in hex format like so:
>
> $ TERM=vt100 /pfx/bin/psql opensips opensips
> psql (9.0.2)
> Type "help" for help.
>
> opensips=> select * from sip_trace;
> id | time_stamp | callid | traced_user | msg | method | ...
> 1234 | 2011-02-03 | ... | | \x494e56495445207369703a...
>
> Others have said that when they use MySQL, the exact SQL command
> as above results in ASCII text rather than hexadecimal, and this
> is my goal as well.
You might attempt to apply decode(column, 'hex') to the
relevant column.
Better be sure the result really is printable text.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346