Don, Michael, and Ben,
Thanks for your ideas. I see the problem. I like Ben's solution. I was experiencing the problem in many places, which is why I thought I ought to just change the procedure to work for now. However, it messes up other parts of the openACS (like the login), so I've undone my changes, and I live with the bugs, or fix them one at a time. However, I agree that Michael's naming convention would make more sense if I were to be using this function in new development.
At the end of the day, if Postgres fixes this error, we'll all be better off.