Re: get date in binary number format
| От | Tom Lane |
|---|---|
| Тема | Re: get date in binary number format |
| Дата | |
| Msg-id | 20271.1033095137@sss.pgh.pa.us обсуждение |
| Ответ на | Re: get date in binary number format ("Johnson, Shaunn" <SJohnson6@bcbsm.com>) |
| Ответы |
Re: get date in binary number format
|
| Список | pgsql-general |
"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
В списке pgsql-general по дате отправления: