Forum OpenACS Q&A: Response to ORA-01000: maximum open cursors exceeded ??

As a quick check, I just did
  find openacs4 -name '*.[xs]ql' |xargs grep -i 'open ' |
    egrep -v 'ql:[[:space:]]*--|ql:[[:space:]]/[*]'

to list all the places in .sql and .xql files that cursors get opened (the nasty-looking egrep -v just excludes comment lines from the output). I see 74 such places in 28 files. Someone who knows PL/SQL and plpgsql better than I do might want to review each such open of a cursor to check that there is a corresponding close in all possible code paths, generating patches as necessary?

Now that Andrew has found and identified the issue, it would be good to deal with it systematically, rather than on an ad-hoc per-module basis, I think.