Re: function bit(integer) - Mailing list pgsql-general

From Tom Lane
Subject Re: function bit(integer)
Date
Msg-id 763.1116192829@sss.pgh.pa.us
Whole thread Raw
In response to Re: function bit(integer)  (Samer Abukhait <abukhait@gmail.com>)
List pgsql-general
Samer Abukhait <abukhait@gmail.com> writes:
> select "bit"(1);
> ERROR:  function bit(integer) does not exist

Try
    select 1::bit(32);
or if you prefer
    select cast(1 as bit(32));

What you have above is essentially a direct invocation of the int-to-bit
cast function; which you can do if you like, but it's deprecated for
precisely the reason that we don't promise it'll remain stable.

            regards, tom lane

pgsql-general by date:

Previous
From: Samer Abukhait
Date:
Subject: Re: function bit(integer)
Next
From: tony
Date:
Subject: date problem