Re: Display integer value as Hex. - Mailing list pgsql-novice

From Joe Conway
Subject Re: Display integer value as Hex.
Date
Msg-id 3F1782C5.80502@joeconway.com
Whole thread Raw
In response to Display integer value as Hex.  (HK <harikrishnan@midascomm.com>)
List 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


pgsql-novice by date:

Previous
From: HK
Date:
Subject: Display integer value as Hex.
Next
From: Alejandro Fuentes González
Date:
Subject: I´ve got problems when I try to use de psql