[SQL] BYTEA output presentation

2004-07-16 Thread Peter Wang

I output the BYTEA datatype for a table in our database.
The BYTEA data look like /031/024/001/003?/022/. 
How can I use some PostgreSQL function to remove / when I use select statement ?
What type of format is the BYTEA datatype? Can I output it to hexadecimal or octal 
format ? If you can, how ? 
Or do you know any third party tool or script which can output the hexadecimal or 
octal format for PostgreSQL's BYTEA datatype ? 
Your help is appreciated. Thank you. 



Peter Wang,

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [SQL] BYTEA output presentation

2004-07-16 Thread Peter Eisentraut
Peter Wang wrote:
 The BYTEA data look like /031/024/001/003?/022/.
 How can I use some PostgreSQL function to remove / when I use
 select statement ? What type of format is the BYTEA datatype? Can I
 output it to hexadecimal or octal format ? If you can, how ? Or do
 you know any third party tool or script which can output the
 hexadecimal or octal format for PostgreSQL's BYTEA datatype ? Your
 help is appreciated. Thank you.

libpq has functions to deal with bytea data: 
http://www.postgresql.org/docs/7.4/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-BYTEA

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org