Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2TEV-0003E4-R1 for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Feb 2013 21:05:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U2TEU-0003wU-M5 for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Feb 2013 21:05:42 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U2TEM-0003p5-TJ for pgsql-bugs@postgresql.org; Mon, 04 Feb 2013 21:05:35 +0000 Received: from nm12-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.140]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U2TEI-00077f-VC for pgsql-bugs@postgresql.org; Mon, 04 Feb 2013 21:05:33 +0000 Received: from [98.139.212.146] by nm12.bullet.mail.bf1.yahoo.com with NNFMP; 04 Feb 2013 21:05:29 -0000 Received: from [98.139.212.199] by tm3.bullet.mail.bf1.yahoo.com with NNFMP; 04 Feb 2013 21:05:29 -0000 Received: from [127.0.0.1] by omp1008.mail.bf1.yahoo.com with NNFMP; 04 Feb 2013 21:05:29 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 71759.93785.bm@omp1008.mail.bf1.yahoo.com Received: (qmail 44018 invoked by uid 60001); 4 Feb 2013 21:05:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1360011928; bh=T4R3a+RbYwkbJsltufPju3I9ryuNr64ovZfiSH/uh4U=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VktHS+4CI9DxSAKDYOPIuis0azo+w2/ywOznab/VojkGd0mlesE7rEtnYPGncKQbtm4FVTPL8e5Yq2Z8Yq7xgl7z9+zlEe5Tiks2XEdylijZgTfJsEPFNXemmJ98ct7C1pFWlv4L/Iw3Ead+7poWUD5I2kgNIcn62JT93//0sJw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=JafR71ICaH+IGKmMvVKPhnruMeBD6fy/7H08kyDt6F5uUZmFp+U1UopOve68BZviQOjvMHli306nEGehG837QfS0IV5y+/58VHnIdUK+RbiOciH2AdVJ9aQtWYZpLHWZRmPDqvptcTEu6FNz/BcXaX0dxLBwOKKLvoJ0MtzkMFg=; X-YMail-OSG: Wlfx8JgVM1mzXkFFZ5l_RKT.1JJJC25g3.YAkEMhh88GAly xE1xpF66_pz167Ep7MZP9U0aMO5llj63Q1L9jO49BhJmp01gDMdXbqcBlYRe 25T1MQZsqP2BPjqYtCWwq0RRSTXdxc81m2NgpCG9ksxRvgo7CbRfN69Su7uR 9pGaL9L5Fg6HwOGDVGbOO.7xrMP2a78AL_k3AkPoYLlZbRtb42t2J10_WUVD mdO8MY8aO7GV5Zhdx_NVPxky5Dv_wEeEqFZXbgsIldAqx0PkJWA2pgfJ.EuF 2BBzmABZ1tS2ANPJ5hgjFdiP4ctEhF0JPLRH52K_tZ1lp5fmfilIJDurFqA1 QDRiSry4qCaYgKfF6ZwbvnXaKOPa0WFkzfn0b4QuLxo8P2x9O4P1fKn15JHz akNK6E3PDC.3Y5WKl2hckaBVnhYOsVk5hftjgR8QN2ZZApg2Gp3bCCTukbyL jBQigmgTYkYKeOCLxHuE- Received: from [76.255.19.161] by web162901.mail.bf1.yahoo.com via HTTP; Mon, 04 Feb 2013 13:05:28 PST X-Rocket-MIMEInfo: 001.001, Im1pa2VAZm9udGxpbmcuY29tIiA8bWlrZUBmb250bGluZy5jb20.IHdyb3RlOgoKPiBEb2N1bWVudGF0aW9uIGZvciB0aGUgU1FMIFVQREFURSBzdGF0ZW1lbnQgZG9lc24ndCBtZW50aW9uIHRoYXQKPiBpdCBzZXRzIHRoZSBGT1VORCB2YXJpYWJsZS4gKFJlZmVyIHRvIHNxbC11cGRhdGUuaHRtbCwKPiAiT3V0cHV0cyIuKSBUaGF0IGJlaGF2aW9yICppcyogZG9jdW1lbnRlZCwgYnV0IG9ubHkgaW4KPiBwbHBnc3FsLXN0YXRlbWVudHMuaHRtbCAoQmFzaWMgU3RhdGVtZW50cywgc2VjdGlvbiAzOS41LjUpLgoBMAEBAQE- X-Mailer: YahooMailWebService/0.8.132.503 References: Message-ID: <1360011928.28724.YahooMailNeo@web162901.mail.bf1.yahoo.com> Date: Mon, 4 Feb 2013 13:05:28 -0800 (PST) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: BUG #7846: Documentation: Should FOUND be documented as an output of UPDATE statement? To: "mike@fontling.com" , "pgsql-bugs@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.6 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org "mike@fontling.com" wrote: > Documentation for the SQL UPDATE statement doesn't mention that > it sets the FOUND variable. (Refer to sql-update.html, > "Outputs".) That behavior *is* documented, but only in > plpgsql-statements.html (Basic Statements, section 39.5.5). > > I understand the difference between a SQL statement and a > PL/PGSQL statement. But if I were looking for the effects and > side-effects of an UPDATE statement, I'd go to the docs for > UPDATE, not for PL/PGSQL basic statements. I think that's what > most people would do, especially if they didn't have prior > knowledge of the FOUND variable. Outside of plpgsql there isn't any FOUND variable to set.=A0 If we did what you suggest, I think we'd get bug reports about this: test=3D# update t set amt =3D 2 where id =3D 1; UPDATE 1 test=3D# select found; ERROR:=A0 column "found" does not exist LINE 1: select found; =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ^ plpgsql creates a FOUND variable and sets it based on the rows affected by various statements. Besides that, with all the various PLs that are supported in PostgreSQL, littering the documention of each SQL statement with details of how that statement is supported in each PL would get really messy really quickly. -Kevin --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs