"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:
> I get this when I try the following select:
> testdb=> select "bit"((date_part('doy', now()))::integer);
> ERROR: Function 'bit(int4)' does not exist
In CVS tip I get
regression=# select "bit"((date_part('doy', now()))::integer);
bit
----------------------------------
00000000000000000000000100001101
(1 row)
but I think the int4-to-bit(32) conversion function was added for 7.3.
There also seems to be an int8-to-bit(64) function now:
regression=# select "bit"((date_part('doy', now()))::int8);
bit
------------------------------------------------------------------
0000000000000000000000000000000000000000000000000000000100001101
(1 row)
IIRC, Tom Lockhart put in both of those a couple months ago.
regards, tom lane