Writing your own aggregate functions

From: Bastiaan Olij <bastiaan(at)basenlily(dot)me>
To: pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Writing your own aggregate functions
Date: 2013-03-06 03:44:39
Message-ID: 5136BBA7.5030202@basenlily.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hiya,

I was wondering if it is possible in Postgres to write an aggregate
function?

So say if I wanted to execute the following statement:

select Column1, sum(Column2), myFunction(Column3)
from MyTable
group by Column1

Could I implement myFunction as a stored function and how would I go
about doing so?

Cheers,

Bas

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Merlin Moncure 2013-03-06 03:54:39 Re: Writing your own aggregate functions
Previous Message Tom Lane 2013-03-04 18:49:24 Re: PostgreSQL Query Speed Issues