SRF and pg_group

Started by Nigel J. Andrewsover 23 years ago1 messages
#1Nigel J. Andrews
nandrews@investsystems.co.uk
4 attachment(s)

I realise that this has already been done, by Joe Conway I think. Indeed I was
looking at this just before beta1 when I happened to notice the post giving the
plpgsql function. However, as I had started work on it and I was interested in
seeing how things should be done I continued, only not in so much of a rush.

In the interests on finding out if I have approached this the right way, or the
way a more experienced backend programmer would, I'd appreciate any comments on
the attached .c file. In particular, I'm not sure what I'm doing with regard to
memory contexts, I think I may have one unnecessary switch in there, and in
general I seem to be doing a lot of work just to find out tidbits of
information.

I based this on, i.e. started by editing, Joe Conway's tablefunc.c but I think
there's very little of the original left in there.

I've also attached the .h, Makefile and .sql.in files to make this work if
anyone is interested in giving it a run. The .sql.in shows the usage. I did
this in a directory called pggrouping, for the sake of a better name, under the
contrib directory in my tree, so that's probably the best place to build it.

Thanks, and sorry for adding to people's email and work load.

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

Attachments:

pggrouping.ctext/x-csrc; name=pggrouping.cDownload
pggrouping.htext/x-chdr; name=pggrouping.hDownload
Makefiletext/plain; charset=US-ASCII; name=MakefileDownload
pggrouping.sql.intext/plain; charset=US-ASCII; name=pggrouping.sql.inDownload