pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BYTEA output presentation
2+ messages / 2 participants
[nested] [flat]

* BYTEA output presentation
@ 2004-07-16 20:18  Peter Wang <pwang@voyence.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Peter Wang @ 2004-07-16 20:18 UTC (permalink / raw)
  To: pgsql-sql


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,



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BYTEA output presentation
@ 2004-07-16 20:48  Peter Eisentraut <peter_e@gmx.net>
  parent: Peter Wang <pwang@voyence.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2004-07-16 20:48 UTC (permalink / raw)
  To: Peter Wang <pwang@voyence.com>; pgsql-sql

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/




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-07-16 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-07-16 20:18 BYTEA output presentation Peter Wang <pwang@voyence.com>
2004-07-16 20:48 ` Peter Eisentraut <peter_e@gmx.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox