pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Mark Fenbers <Mark.Fenbers@noaa.gov>
Cc: pgsql-sql@postgresql.org
Subject: Re: Aggregate Functions Template
Date: Thu, 19 May 2005 14:56:11 -0600
Message-ID: <20050519205611.GA92458@winnie.fuhr.org> (raw)
In-Reply-To: <428CE633.50403@noaa.gov>
References: <428CE633.50403@noaa.gov>

On Thu, May 19, 2005 at 03:17:07PM -0400, Mark Fenbers wrote:
>
> I need to create an aggregate function to do some math not currently 
> provided by the available tools.  Can someone point to an example 
> aggregate function syntax that I can use as a template for my own 
> function.  I'm still a little green on some aspects of PostgreSQL and am 
> drawing a blank on how to do this properly from scratch.

The General Bits newsletter has a few examples that might be helpful,
even if they're not quite what you're after:

http://www.varlena.com/varlena/GeneralBits/109.php
http://www.varlena.com/varlena/GeneralBits/4.html

There are sure to be some examples in the list archives -- just
search for "create aggregate":

http://archives.postgresql.org/

If these links don't help, then please post more details about what
you're trying to do and what trouble you're having.  If you have
any code that doesn't work the way you want but that helps show
what you're after, then go ahead and post it with an explanation
of what it does (or doesn't do) and what you'd like it to do (or
not do).

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



view thread (4+ messages)  latest in thread

Message-ID: <20050519205611.GA92458@winnie.fuhr.org>
Permalink:  ../20050519205611.GA92458@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050519205611.GA92458@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, Mark.Fenbers@noaa.gov
  Subject: Re: Aggregate Functions Template
  In-Reply-To: <20050519205611.GA92458@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox