Re: Implicit row locking during an UPDATE

From: "Eric G(dot) Miller" <egm2(at)jps(dot)net>
To: pgsql-general(at)postgreSQL(dot)org
Subject: Re: Implicit row locking during an UPDATE
Date: 2001-05-25 04:25:43
Message-ID: 20010524212543.A5353@calico.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, May 25, 2001 at 02:23:50AM -0000, Dr. Evil wrote:
>
> I'm still not understanding this, and it's vitally important to the
> project I'm working on, so I have a question:
>
> >From my understanding, this:
>
> UPDATE account SET value = 10 WHERE number = 99;
>
> actually implies all of this:
>
> BEGIN;
> SELECT value FOR UPDATE FROM account WHERE number = 99;
> UPDATE account SET value = 10 WHERE number = 99;
> COMMIT;
> END;
>
> Is this correct? If so, there's something I don't understand.

No. Maybe you want to read the manual. Specifically look at
transaction isolation level under MVCC. Hmm, SET TRANSACTION ISOLATION
LEVEL doesn't seem to be taking in 7.1.1... Is that a bug? Guess the
only way to be sure is to use the transaction semantics above...

--
Eric G. Miller <egm2(at)jps(dot)net>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-05-25 04:45:32 Re: Implicit row locking during an UPDATE
Previous Message Dr. Evil 2001-05-25 02:23:50 Implicit row locking during an UPDATE