From: "TJ O'Donnell" <tjo(at)acm(dot)org>
To: <stephen(dot)quinney(at)computing-services(dot)oxford(dot)ac(dot)uk>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject:
Date: 2005-04-15 12:52:52
Message-ID: 1168.12.10.164.2.1113569572.squirrel@gnova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

There some documentation about aggregate functions in the manual, for example:
http://www.postgresql.org/docs/7.4/static/sql-createaggregate.html

Here's a simple agg function that should work for you,
assuming your col types are int4.

CREATE AGGREGATE andsum (
sfunc = int4and,
basetype = int4,
stype = int4
);

TJ

Browse pgsql-sql by date

  From Date Subject
Next Message Dinesh Pandey 2005-04-15 14:40:06 Re: send mail from Postgres using PLTCLU language.
Previous Message Dinesh Pandey 2005-04-15 12:47:49 send mail from Postgres using PLTCLU language.