Re: Silly Newbie question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Silly Newbie question
Date
Msg-id 21552.1204258056@sss.pgh.pa.us
Whole thread Raw
In response to Silly Newbie question  (Aaron Spiteri <azzmosphere@hotmail.com>)
List pgsql-hackers
Aaron Spiteri <azzmosphere@hotmail.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


pgsql-hackers by date:

Previous
From: "Pavan Deolasee"
Date:
Subject: Re: CREATE TABLE, load and freezing
Next
From: Tom Lane
Date:
Subject: Re: Silly Newbie question