Re: Aggregate binary AND

From: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
To: James Orr <james(at)lrgmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Aggregate binary AND
Date: 2001-11-01 18:09:58
Message-ID: 20011101100830.S28814-100000@teak.adhesivemedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

This worked for us in 7.something (don't need it anymore, but it should
still work).

You'll want to create one for INT8, INT2, etc.. if you are going to use
those as well...

CREATE AGGREGATE aggr_bitand ( BASETYPE = INT4, SFUNC1 = int4and, STYPE1 =
INT4);

On Thu, 1 Nov 2001, James Orr wrote:

> Hi,
>
> Is there an aggregate binary AND function in postgres? If not, is there a
> way to write your own aggregate functions? Examples?
>
> - James
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2001-11-01 18:49:00 Sorry for blocking email
Previous Message Joe Conway 2001-11-01 18:08:52 Re: How to use BYTEA type?