Search Postgresql Archives

Cursors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

What happens to cursors when new data is added to a table after you
start iterating
over its rows?

For example, given the following loop...

for rule in select tc.sid, tc.s, td.rule, td.returns
                     from tcell tc
               inner join tcelldef td on (tc.p = td.p)
                    where tc.iasid = current_audit_sid()
                       or committed_sid in ( select committed
                                               from tcellread tcr
                                              where tc.sid = tcr.tcell )
                         for update of tc loop
  ...
end loop;

some code in the loop might add a record into tcellread that causes the where
condition to become true for a row in which it was previously false.
Will the cursor
eventually see it?

Thanks,
Andy

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux