Re: Silly Newbie question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aaron Spiteri <azzmosphere(at)hotmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Silly Newbie question
Date: 2008-02-29 04:07:36
Message-ID: 21552.1204258056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Aaron Spiteri <azzmosphere(at)hotmail(dot)com> writes:
> I wish to create a an aggregate function and have read and re-read the
> 34.10 section of the 8.3 documentation as well as scanned through the
> fmgr header file. My problem is that I know certain structures are
> created with the idea of retaining information for use in the state
> function but I don't really understand which structures I should be
> looking at and how to initilize them (if needed) in the sfunc. Any
> pushes in the right direction would be very appreciated, I am using
> the Version 1 calling convention.

Are there any existing aggregates that do something similar to what you
need? If so, try taking a look at their source code. The general rule
in writing C code for Postgres is that it's an open-book test ;-) ---
you are expected to look at the code, not only the documentation.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-02-29 04:13:59 Re: Silly Newbie question
Previous Message Pavan Deolasee 2008-02-29 04:06:27 Re: CREATE TABLE, load and freezing