Subject | Re: [Firebird-Architect] AND CHAIN / AND NO CHAIN |
---|---|
Author | Ann W. Harrison |
Post date | 2004-06-08T14:33:15Z |
At 06:36 AM 6/8/2004, Daniel Rail wrote:
which provides consistent reads. In Firebird, a consistent read
transaction started after a commit sees the same state of data as
its predecessor. Holding cursors open is one part of commit retaining.
The other part is maintaining the consistent view of data.
Regards,
Ann
>So basically, by following SQL-99 and SQL-2003 standards, to have theNot exactly. Both the standard and Firebird recognize a transaction
>equivalent of FB's COMMIT RETAINING would be:
>
>DECLARE <cursor_name> CURSOR WITH HOLD
> FOR SELECT F1, F2 FROM TABLE1 FOR UPDATE;
>OPEN <cursor_name>;
>...
>COMMIT AND CHAIN;
>
>The WITH HOLD in the DECLARE CURSOR statement is to tell the RDBMS
>that the cursor remains open when a COMMIT takes place, and will only
>be closed when a CLOSE <cursor_name> statement is executed.
which provides consistent reads. In Firebird, a consistent read
transaction started after a commit sees the same state of data as
its predecessor. Holding cursors open is one part of commit retaining.
The other part is maintaining the consistent view of data.
Regards,
Ann