Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns - Mailing list pgsql-sql

From Tom Lane
Subject Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns
Date
Msg-id 8620.1226336275@sss.pgh.pa.us
Whole thread Raw
In response to Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
Richard Huxton <dev@archonet.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


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Using UTF strings in pg8.3 - storing hexadecimal values in bytea columns
Next
From: "Kevin Duffy"
Date:
Subject: inserts within function, within insert