Re: Mistake in statement example

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: marlene(dot)brandstaetter(at)cargonet(dot)software
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Mistake in statement example
Date: 2023-03-01 16:34:11
Message-ID: 1522262.1677688451@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> I believe there is a mistake in an example on
> https://www.postgresql.org/docs/current/transaction-iso.html section
> 13.2.1:
> BEGIN;
> UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
> UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534;
> COMMIT;

> The acctnum is expected to be 12345 in both cases.

No, I think that's intentional: the example depicts transferring
$100 from account 7534 to account 12345.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2023-03-01 16:45:00 Re: Mistake in statement example
Previous Message PG Doc comments form 2023-03-01 07:21:30 Mistake in statement example