Re: Is there a function for Converting a Decimal into BINARY ?

Поиск
Список
Период
Сортировка
От Harvey, Allan AC
Тема Re: Is there a function for Converting a Decimal into BINARY ?
Дата
Msg-id E97A5BB7699CAD48BE2711E71247116505AAFC70@ntlmsg03.onesteel.com
обсуждение исходный текст
Ответ на Is there a function for Converting a Decimal into BINARY ?  ("Ow Mun Heng" <ow.mun.heng@wdc.com>)
Список pgsql-general
> Eg:
> I have a datatype in the DB which needs to be converted.
>
> DEC = 192
> BINARY = 11000000

How about this....

gwmdb=> select 192::bit(16);
       bit
------------------
 0000000011000000
(1 row)

Hope that helps

Allan


The material contained in this email may be confidential, privileged or copyrighted. If you are not the intended
recipient,use, disclosure or copying of this information is prohibited. If you have received this document in error,
pleaseadvise the sender and delete the document. Neither OneSteel nor the sender accept responsibility for any viruses
containedin this email or any attachments. 

В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Is there a function for Converting a Decimal into BINARY ?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: How to simulate crashes of PostgreSQL?