Re: hex to decimal and back again

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: hex to decimal and back again
Дата
Msg-id 3E89DEF3.8070400@joeconway.com
обсуждение исходный текст
Ответ на hex to decimal and back again  (Peter Nixon <listuser@peternixon.net>)
Список pgsql-general
Peter Nixon wrote:
> 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.
>

Is this what you need?

regression=# select x'ffff'::int4;
  int4
-------
  65535
(1 row)

HTH,

Joe


В списке pgsql-general по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: create type problem!
Следующее
От: Tom Lane
Дата:
Сообщение: Re: create type problem!