hex to decimal and back again - Mailing list pgsql-general

From Peter Nixon
Subject hex to decimal and back again
Date
Msg-id b5v5rb$cuj$1@news.hub.org
Whole thread Raw
Responses Re: hex to decimal and back again  (Joe Conway <mail@joeconway.com>)
List pgsql-general
Hi guys

I have some hex values which I am currently storing in varchar fields which
I would like to convert to decimal integers to make sorting and indexing
work correctly. I may need to convert them back to hex at some point for
display but this is not strictly necessary. I can seem to find the right
function to do this in postgres.

I can obviously do it in perl but thats not the best way.

Can someone give me pointers?

--

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc

pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: how to test whether postgres server is running?
Next
From: Tad Marko
Date:
Subject: Re: Earth distance