sum up rows of BITs - Mailing list pgsql-general

From Thomas T. Thai
Subject sum up rows of BITs
Date
Msg-id Pine.NEB.4.21.0112040306490.14093-100000@ns01.minnesota.com
Whole thread Raw
List 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?


pgsql-general by date:

Previous
From: mgundlach@comosoft.de (Michael Gundlach)
Date:
Subject: Re: Large tables management question
Next
From: "Andy Marden"
Date:
Subject: Re: Casting Varchar to Numeric