[HACKERS] MemoryContextSwitchTo() confusion

2008-03-20 Thread Dan Searle
Hi, I've written a custom C-language function that takes a SQL select statement as it's input parameter, runs the query using the SPI interface, iterates over all the results of the select using a cursor and collates the data using a tsearch type binary tree, then walks the tree to create a

[HACKERS] Collating records based on a custom group by (aggregate like) function

2008-03-18 Thread Dan Searle
the execution of a query, and then free it's state when the query finishes. I've racked my brain about this but can't think of a simple solution, even though this appears to be a simple problem, any suggestions much appreciated. Regards, Dan... -- Dan Searle Adelix Ltd [EMAIL PROTECTED] web