Re: Display integer value as Hex.

From: Joe Conway <mail(at)joeconway(dot)com>
To: HK <harikrishnan(at)midascomm(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Display integer value as Hex.
Date: 2003-07-18 05:16:53
Message-ID: 3F1782C5.80502@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

HK wrote:
> Is there any function available in pgsql to display an integer value as
> a hex value and vice versa.
>

This works in 7.3, but not earlier:

test=# select to_hex(15678);
to_hex
--------
3d3e
(1 row)

This might also work in 7.2, but I'm not too sure, and I don't have a
7.2.x installation to test with:

test=# select x'3d3e'::int;
int4
-------
15678
(1 row)

HTH,

Joe

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Alejandro Fuentes González 2003-07-18 15:19:20 I´ve got problems when I try to use de psql
Previous Message HK 2003-07-18 05:10:02 Display integer value as Hex.