Re: hexdecimal constant in postgresql - Mailing list pgsql-novice

From Chris
Subject Re: hexdecimal constant in postgresql
Date
Msg-id 1090913372.5322.1.camel@dell
Whole thread Raw
In response to hexdecimal constant in postgresql  (Chris <list@1006.org>)
List pgsql-novice
> i was wondering how to specify hexadecimal constants in
> SQL in a way that postgresql understands.
>
> something like:
>
> select 0xFFFF;   -- this doesn't work;
>
> I've googled for it and i've found it can be done with
> encode/decode involving a bytea type - but i'm under
> the impression there must be a more straightforward way...

I've found it myself :)

  select x'FFFF'::int;     -- this works

Bye, Chris.



pgsql-novice by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: help with conversion functions
Next
From: Rafael Charnovscki
Date:
Subject: Re: Varchar or integer primary key?