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