Re: [GENERAL] Unpredicatable behavior of volatile functions used in cursors

2007-01-15 Thread Tom Lane
Aleksander Kmetec <[EMAIL PROTECTED]> writes: > We're using the following technique for counting the number of rows in a > cursor: > DECLARE instance_cur_1 SCROLL CURSOR FOR > SELECT util.row_number(), * > FROM ( > $LONG_RUNNING_QUERY > ) ss > FETCH LAST IN instance_cur_1; > util.row_number

[GENERAL] Unpredicatable behavior of volatile functions used in cursors

2007-01-15 Thread Aleksander Kmetec
Hi, I'm running into some inconsistent behavior when using volatile functions with cursors under PG 8.1. We're using the following technique for counting the number of rows in a cursor: --- DECLARE instance_cur_1 SCROLL CURSOR FOR SELECT util.row_number(), * FROM ( $LONG_RUNNIN