Forum OpenACS Development: Response to Cursors

Collapse
5: Response to Cursors (response to 1)
Posted by Tom Jackson on

"My rule of thumb is always to use an explicit cursor for all SELECT statements in my applications, even if an implicit cursor might run a little faster...

"By setting and following this clear-cut rule, I give myself one less thing to think about. I do not have to determine if a particular SELECT statement will return only one row...I do not have to wonder about the conditions under which a single-row query might suddenly return more than one row, thus requiring a TOO_MANY_ROWS exception handler. I am guaranteed to get vastly improved programmatic control over the data access and more finely-tuned exception handling for the cursor."

From page 166 of O'Reilly's _Oracle PL/SQL Programming_

Maybe the ACS team read the same, and put it into practice.