Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qzINr-00FL5l-3B for pgsql-docs@arkaria.postgresql.org; Sat, 04 Nov 2023 15:16:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qzINn-006TK2-C7 for pgsql-docs@arkaria.postgresql.org; Sat, 04 Nov 2023 15:16:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qzINm-006TJt-Rk for pgsql-docs@lists.postgresql.org; Sat, 04 Nov 2023 15:16:18 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qzINh-003wJK-EC for pgsql-docs@lists.postgresql.org; Sat, 04 Nov 2023 15:16:17 +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 3A4FGBPc3475326; Sat, 4 Nov 2023 11:16:11 -0400 From: Tom Lane To: tomtrias@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: Please make a note regarding the PL/pgSQL FOUND variable In-reply-to: <169894333941.1769272.13207972370571788231@wrigleys.postgresql.org> References: <169894333941.1769272.13207972370571788231@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Thu, 02 Nov 2023 16:42:19 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3475324.1699110971.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 04 Nov 2023 11:16:11 -0400 Message-ID: <3475325.1699110971@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: > Since I was recently bitten by the fact that CREATE TABLE AS doesn't set= the > PL/pgSQL variable FOUND, it would be nice if that were explicitly noted = in > the documentation. Alternatively, if it COULD set the FOUND variable, t= hat > would be great, although I realize the difficulty of that when coupled w= ith > IF NOT EXISTS. The documentation of FOUND is already quite explicit about which kinds of statements set it: https://www.postgresql.org/docs/current/plpgsql-statements.html#PLPGSQL-ST= ATEMENTS-DIAGNOSTICS I'm disinclined to put notes about PL/pgSQL features into command reference pages that have nothing to do with PL/pgSQL. regards, tom lane