I wonder if the order in which records are locked is guaranteed when I use SELECT ... FOR UPDATE in cursors ?
For example,
DECLARE
CURSOR test_cursor IS
SELECT field1, field2
FROM table1
ORDER BY pk_field
FOR UPDATE OF field1;
When I open such a cursor, will it always lock records in the order of pk_field ?
From what I read so far order of locking is not guaranteed for regular SELECT ... ORDER BY pk_field FOR UPDATE , but I'm not sure if it's true for cursors. I'd expect it does lock in the order set in ORDER BY clause for cursors; however, I cannot find confirmation.
Thank you.