Tom Lane wrote:
Christopher Kings-Lynne <[EMAIL PROTECTED]> 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


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to