Hex to char - Mailing list pgsql-general

From Andrew Bartley
Subject Hex to char
Date
Msg-id CAEAIPJHMAFOJGDANDACEELKFAAA.abartley@evolvosystems.com
Whole thread Raw
List pgsql-general
Hi all,

I wish to do something like this

select chr(x'22')
result "

But using a column from a table as the argument

eg

create table test
(
hex_value    char(2)
)

insert into test values ('22')

select chr(hex_value) from test; ( I understand this won't work, but I need
something like it )

I have looked at all of the string functions but can't find a solution short
of writing my own function.

We are on 7.2.1

Thanks

Andrew


pgsql-general by date:

Previous
From: Grant McLean
Date:
Subject: Re: Locking with foreign key constraints
Next
From: Michal Hlavac
Date:
Subject: Tsearch2 - list of words or phrase with count