count the number of bits set to 1 in a bit string field

From: Rajarshi Guha <rguha(at)indiana(dot)edu>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: count the number of bits set to 1 in a bit string field
Date: 2007-07-15 19:35:55
Message-ID: 67D82BA8-7F7C-4E88-86DD-FD086F748C6B@indiana.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, is there a built in function that will give me the number of bits
that are set to 1 in a bit string field?

Thanks,

-------------------------------------------------------------------
Rajarshi Guha <rguha(at)indiana(dot)edu>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
Without love intelligence is dangerous;
without intelligence love is not enough.
-- Ashley Montagu

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Becker 2007-07-15 21:02:35 Re: count the number of bits set to 1 in a bit string field
Previous Message angga erwina 2007-07-15 16:03:47 slony over LAN and VPN