Received: from teak.adhesivemedia.com (teak.adhesivemedia.com [207.202.159.79]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA1IAUP87190 for ; Thu, 1 Nov 2001 13:10:30 -0500 (EST) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by teak.adhesivemedia.com (8.11.6/8.11.6) with ESMTP id fA1I9wV30350; Thu, 1 Nov 2001 10:09:58 -0800 (PST) (envelope-from philip@adhesivemedia.com) Date: Thu, 1 Nov 2001 10:09:58 -0800 (PST) From: Philip Hallstrom To: James Orr cc: pgsql-sql@postgresql.org Subject: Re: Aggregate binary AND In-Reply-To: <00c901c162f8$f7df42e0$1600000a@lrg.office> Message-ID: <20011101100830.S28814-100000@teak.adhesivemedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200111/20 X-Sequence-Number: 5406 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 >