Re: BIN() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: BIN()
Date
Msg-id 12504.1133321732@sss.pgh.pa.us
Whole thread Raw
In response to Re: BIN()  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: BIN()  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> 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).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: BIN()
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: BIN()