Re: BIN()

Поиск
Список
Период
Сортировка
Искать
От
Christopher Kings-Lynne
Тема
Re: BIN()
Дата
Msg-id
438D1F24.5070407@familyhealth.com.au
Ответ на
Re: BIN() (Tom Lane)
Список
Дерево обсуждения
BIN() Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: BIN() Tino Wildenhain <tino@wildenhain.de>
Re: BIN() Michael Fuhr <mike@fuhr.org>
Re: BIN() Tino Wildenhain <tino@wildenhain.de>
Re: BIN() Andrew Dunstan <andrew@dunslane.net>
Re: BIN() Michael Fuhr <mike@fuhr.org>
Re: BIN() Michael Fuhr <mike@fuhr.org>
Re: BIN() Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: BIN() Tom Lane <tgl@sss.pgh.pa.us>
Re: BIN() Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: BIN() Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: BIN() Andrew Dunstan <andrew@dunslane.net>


Tom Lane wrote:
> Christopher Kings-Lynne  writes:
> 
>>>test=> SELECT ltrim(textin(bit_out(12::bit(64))), '0');
>>>ltrim 
>>>-------
>>>1100
>>>(1 row)
> 
> 
>>Sweeeeet.  Good old i/o functions.
> 
> 
> Who needs the I/O functions?  Just cast int to bit(n).

Then how do you remove all leading zeros, and make sure you choose a 
high enough 'n'?

Chris


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
Сообщение: Re: BIN()
От: Andrew Dunstan
Дата:
Сообщение: Re: BIN()
FAQ