Forum OpenACS Development: Response to Cursors

Collapse
4: Response to Cursors (response to 1)
Posted by Don Baccus on
I've always changed to the simple select case (or the FOR loop over the result set when the cursor is assigned more than one row) without problem.

The Oracle docs indicate that the NOT FOUND case *should* work just fine with simple selects, BTW, but in practice I found that not to be true and digging in ACS code a year or so ago found that they'd run into the same sort of problem, apparently (you can catch the exception  raised when no row's returned but the NOT FOUND example in the Oracle 8i doc doesn't work).

As Dan says, this isn't a problem in PG.  And as Gilbert's noted, the ACS use of cursors often doesn't check for the NOT FOUND case anyway.