Forum OpenACS Development: Response to New implementation of tree_sortkey

Posted by David Walker on
Maybe helpful, maybe not. The next postgres version, with "create or replace" will allow self referencing recursive functions. (You need "create or replace" because currently the "create function" will fail due to the reference to a function that does not exist yet. Postgres may support self referencing queries with a simple "create function" but I don't know that for sure yet.)

I've written a recursive sql getparents function (using a hack that emulates "create or replace") that gets all the parents and returns a rowset. I don't really have the data available to test the performance of this function but it seems like it should be fast.