sum up rows of BITs

From: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: sum up rows of BITs
Date: 2001-12-04 09:13:08
Message-ID: Pine.NEB.4.21.0112040306490.14093-100000@ns01.minnesota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

i would like to do a SELECT that would return a result by AND-ing all the
BIT's. It seems I'd need a function to operate on all the BITs. How do I
do that?

CREATE TABLE "blah" (
"perm" BIT(31) NOT NULL,
"name" CHARACTER(10) NOT NULL
);

SELECT some_bit_func_to_and("perm") FROM "blah";

is there another way of doing this w/o having to create a custom function?

Browse pgsql-general by date

  From Date Subject
Next Message Luben Karavelov 2001-12-04 10:24:04 Large tables management question
Previous Message Laszlo Hornyak 2001-12-04 09:12:30 Re: java stored procedures