Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group