Re: BIN()

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BIN()
Date: 2005-11-30 03:02:51
Message-ID: 20051130030251.GA32201@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 29, 2005 at 07:57:58PM -0700, Michael Fuhr wrote:
> Any reason not to use sprintf("%b", $_[0])?

Or something like this in SQL or PL/pgSQL:

test=> SELECT ltrim(textin(bit_out(12::bit(64))), '0');
ltrim
-------
1100
(1 row)

--
Michael Fuhr

In response to

  • Re: BIN() at 2005-11-30 02:57:58 from Michael Fuhr

Responses

  • Re: BIN() at 2005-11-30 03:08:08 from Christopher Kings-Lynne

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2005-11-30 03:04:05 Re: BIN()
Previous Message Michael Fuhr 2005-11-30 02:57:58 Re: BIN()