agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: marlene.brandstaetter@cargonet.software
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Mistake in statement example
Date: Wed, 01 Mar 2023 11:34:11 -0500
Message-ID: <1522262.1677688451@sss.pgh.pa.us> (raw)
In-Reply-To: <167765529052.987840.12345375075704447735@wrigleys.postgresql.org>
References: <167765529052.987840.12345375075704447735@wrigleys.postgresql.org>

PG Doc comments form <noreply@postgresql.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





view thread (5+ messages)  latest in thread

Message-ID: <1522262.1677688451@sss.pgh.pa.us>
Permalink:  ../1522262.1677688451@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1522262.1677688451@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marlene.brandstaetter@cargonet.software, pgsql-docs@lists.postgresql.org
  Subject: Re: Mistake in statement example
  In-Reply-To: <1522262.1677688451@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox