Re: Help with converting hexadecimal to decimal

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Chandra Sekhar Surapaneni <chandu(at)positivenetworks(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with converting hexadecimal to decimal
Date: 2005-04-01 02:33:32
Message-ID: 200504010233.j312XW415552@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chandra Sekhar Surapaneni wrote:
> Hi All,
> Is there a built in function which works exactly the opposite way as
> to_hex().
> I basically want to convert a a hexadecimal to a decimal.

Sure:

test=> SELECT x'10'::integer;
int4
------
16
(1 row)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message George Essig 2005-04-01 02:42:07 Re: Upgrade data
Previous Message Palle Girgensohn 2005-04-01 02:20:45 logging prepared queries' arguments?