Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 29 Nov 2005 20:02:51 -0700
  • Message-id: <20051130030251(dot)GA32201(at)winnie(dot)fuhr(dot)org>

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


  • Follow-Ups:

Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group