Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr>, PostgreSQL SQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns
Date: 2008-11-10 16:57:55
Message-ID: 8620.1226336275@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Richard Huxton <dev(at)archonet(dot)com> writes:
> Mario Splivalo wrote:
>> That's true, but I'd still like to use hexadecimal notation.

You could use decode():

regression=# select decode('c5a4', 'hex');
decode
----------
\305\244
(1 row)

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kevin Duffy 2008-11-10 17:11:01 inserts within function, within insert
Previous Message Richard Huxton 2008-11-10 16:42:36 Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns