Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXPPH-0008TQ-W9 for pgsql-docs@arkaria.postgresql.org; Wed, 01 Mar 2023 16:34:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pXPPG-0002XN-3V for pgsql-docs@arkaria.postgresql.org; Wed, 01 Mar 2023 16:34:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXPPF-0002XE-PV for pgsql-docs@lists.postgresql.org; Wed, 01 Mar 2023 16:34:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pXPPD-0006uq-HO for pgsql-docs@lists.postgresql.org; Wed, 01 Mar 2023 16:34:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 321GYBEH1522263; Wed, 1 Mar 2023 11:34:11 -0500 From: Tom Lane To: marlene.brandstaetter@cargonet.software cc: pgsql-docs@lists.postgresql.org Subject: Re: Mistake in statement example In-reply-to: <167765529052.987840.12345375075704447735@wrigleys.postgresql.org> References: <167765529052.987840.12345375075704447735@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Wed, 01 Mar 2023 07:21:30 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1522261.1677688451.1@sss.pgh.pa.us> Date: Wed, 01 Mar 2023 11:34:11 -0500 Message-ID: <1522262.1677688451@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Doc comments form 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