Re: Help with converting hexadecimal to decimal - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Help with converting hexadecimal to decimal
Date
Msg-id 200504010233.j312XW415552@candle.pha.pa.us
Whole thread Raw
In response to Help with converting hexadecimal to decimal  ("Chandra Sekhar Surapaneni" <chandu@positivenetworks.net>)
Responses Re: Help with converting hexadecimal to decimal  (Doug Quale <quale1@charter.net>)
List 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Palle Girgensohn
Date:
Subject: logging prepared queries' arguments?
Next
From: George Essig
Date:
Subject: Re: Upgrade data