Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ow Mun Heng wrote:
Hi Guys,

Searching the net didn't give me much clues as to how to convert a Decimal
number into BINARY.

well, a decimal number is a fixed point number stored in a modified BCD format, which optionally can contain a decimal fractional component.

you likely would want to convert it to a INTEGER or BIGINT first, then cats it to BIT(n) where N is the number of bits you want.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux