On 4/19/06, Joost van der Sluis <[EMAIL PROTECTED]> wrote:
> Several other databases have support for more then one transaction. This
> means that if you want to execute a query, you have to tell in which
> transaction the query should be executed. There are no real standard
> sql-commands for this, but consider something like this:

The one thing that is unclear for me is how do you specify in which
transaction you wish to execute a particular command.

> connect;
> begin trans1;
> begin trans2;

> trans1: select * from tbl1;

Is this some kind of pseudocode, or are you saying that
"trans1: select * from tbl1;"  is valid SQL syntax ?


> trans1: insert into tbl1(str) values ('Welcome');
> trans2: select * from tbl1;
> commit trans1;
> trans2: select * from tbl1;
> commit trans2;
> disconnect;
>
> This code will never show the just inserted value 'welcome'. (Default
> isolation-level)
>
> Since the insert that is done in transaction1, isn't visible for
> transaction2.

Indeed, it's not visible.  Therefore: the same user can see that record
in one place, and at the same time he doesn't see the record in another
place. Is this truly a good thing ?

> Postgres doesn't support multiple transactions in one connection. So you
> have to use two connections. But further it's the same.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to