hex to decimal and back again

From: Peter Nixon <listuser(at)peternixon(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: hex to decimal and back again
Date: 2003-03-27 15:34:57
Message-ID: b5v5rb$cuj$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tycho 2003-03-27 15:35:57 Re: Small file taking up lots of disk space
Previous Message Loki 2003-03-27 15:12:09 PostgreSQL + IDS load/latency help