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 1sUd56-004X8a-Jl for pgsql-docs@arkaria.postgresql.org; Fri, 19 Jul 2024 02:10:48 +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 1sUd54-007LST-7i for pgsql-docs@arkaria.postgresql.org; Fri, 19 Jul 2024 02:10:46 +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 1sUd53-007LSK-07 for pgsql-docs@lists.postgresql.org; Fri, 19 Jul 2024 02:10:46 +0000 Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sUd4v-000IG6-T2 for pgsql-docs@lists.postgresql.org; Fri, 19 Jul 2024 02:10:43 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id AD98D11400C2; Thu, 18 Jul 2024 22:10:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 18 Jul 2024 22:10:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1721355036; x=1721441436; bh=sXrEewuo7x wmUqFNytfH0XmgJ+VGic0GuE4GQY7xOyk=; b=S0jLxpP8qb4RkeaWw/dLokQ9n9 sEm483MLOMtqPsGlmzJf7Me28ETs9GrgGJ8RsUNsBo4qC4gH5scrA/71nKLUGVZL TaABzrdLxxvNrsotJnRMadojSmtdEKRsy9MFg7ax+6ZiETAdW8nCaKNVPSEZbbTh nfORIkiD65KoJat+NsiVLbo7E6lPJQ5aCjj3m+pn+KHOMFH3aBbGZzSNyundGOKZ IySDlL5mIETLdpeMldhoMwNzjZM5OcoPFGnDNvfHQYyszaTCvEbC4fvIxGupklUZ Jr/TcwTKZnL3ITqbC4h8dl0nGbLoScoj3+yLzRe0yUUXkQRE3qGagX4t/uvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1721355036; x=1721441436; bh=sXrEewuo7xwmUqFNytfH0XmgJ+VG ic0GuE4GQY7xOyk=; b=NrsuQ2Z7P06s4YhKJqLXWsjFqiUgqoOVvaD+ybqqJVbi MZGcGHkKwPEAEO3AphD6zfvpyk8ndJxS7Uf+ttkxl/cXFfrMImRuFtzssOColddE qUKAhxrpaDWWujJpceNbIxPIiYV4lw4MDe8qhVnWsDWQPtx+QZFwOw+jNiJcGp5Z dqYATyV/pcuzrKxri16sUNckzmqqZz/v2+Q/71lLXXPBRYfAQtMFaJQQEefV2gI2 T7Ls8MbG6yfLK/J5EcVSuaKeutPY5BEho+r6G76V81lnrZcrplaKzNb3SpwRorN9 uEMbyc46iQYXNZ/Gqjg3X3yPnmxrR1e/YHqBxB8ZHA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrhedtgdehiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculdejtddmnecujfgurhepfffhvf evuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofhitghhrggvlhcurfgrqhhu ihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrh hnpeegkeelteehtdffgedtgfffkeehkedtleehtdfghedtieegueevffdvfedtjeejteen ucffohhmrghinhepshhgmhhlrdhsohenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Jul 2024 22:10:34 -0400 (EDT) Date: Fri, 19 Jul 2024 11:10:25 +0900 From: Michael Paquier To: =?utf-8?B?5pel5ZCR5YWF?= Cc: pgsql-docs@lists.postgresql.org Subject: Re: A minor bug in the doc of "SQL Functions Returning Sets" in xfunc.sgml. Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="y05iml5wMh9HCdBG" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --y05iml5wMh9HCdBG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 19, 2024 at 10:46:04AM +0900, =E6=97=A5=E5=90=91=E5=85=85 wrote: > I have found executable examples that do not work correctly > in the doc of "SQL Functions Returning Sets" in xfunc.sgml. > So I fixed the examples as follows. > - Changed CREATE TABLE tab > '(y int, z int)' to '(x int, y int, z int)' > - Changed INSERT INTO tab > '(1, 2), (3, 4), (5, 6), (7, 8)' > to '(1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)' > - Changed CREATE FUNCTION sum_n_product_with_tab > '(x int, OUT sum int, OUT product int)' > to '(int, OUT sum int, OUT product int)' > - Changed CREATE FUNCTION sum_n_product_with_tab > 'SELECT $1 + tab.y, $1 * tab.y FROM tab;' > to 'SELECT $1 + tab.x, $1 * tab.x FROM tab;' > - Changed result of "SELECT * FROM sum_n_product_with_tab(10);" >=20 > The above will improve the results of examples as follows in this chapter. >=20 > Do you think? Not sure that this is worth changing. The examples work OK when taken in isolation or are able to demonstrate the point they want to show. In short, not all these queries are here to be compatible with the contents in the same area. See for example the case of the "nodes" table on the same page, created nowhere. "tab" is just a more generic table name that's more spread. -- Michael --y05iml5wMh9HCdBG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmaZyxEACgkQnvQgOdby QH0BhQ/+OLR5WbgmAPHxQmJ3WWh5FK5UB1xu5NljPrsnUKKtBowXyyGeQeFnETlj O+LV0zdcCbf3wbJPvkDDIXyhgZO6sse8rfSuW8r5XhkdlYFxll4BIopmw5UOZdvq ++lXjcaKUw1J+7VveRWCwwUpMQRMeZJdrmsvcAw74zvGKuEgDN9g31lCZnvcwTvZ dDElxdzyAx3DLelcpOaLDA2dnStu2SVbquEy+3wyRZmRryzJ4LkeaqObe6ydqxf/ Prpwrrh2d75fxqiNa7eNNsWloE9+LDBpclo3Za8WIV+SukWKCUvB/sYNxIMfnHC5 GVD44TZgySo/ju5wzjZHSO7j99r85QAk8zwEhRPBCQzBNsrd+3IhC5h4petWMc6h EO395rE9CAVP9+N6QuY6XEF+L2pIldA7DewNW7m9m9H95bikUnCUnkVaFnkXMT1k CS64P1EhuSwNNQdIlovO9azXIfAHxAmWNp3OJ1eo5KF012BCvesJbXtd3jmQYlIz tVq371klrujkhl3KDc1TLCu1QqXkBgNkUe3dg2FiCEQbmVL50DmuQ3C55IAEOicE J0qiQPRSB+nf8HzZg37hwtxZGZqM4A268HzZvcUyTqDilbGd9QVAaNa5vmCIwvUU 8xWLH3YzlQ1IFE3AxQi80KPf9ezldmMNGfgQTbXRRwUmNIV10sk= =QfVN -----END PGP SIGNATURE----- --y05iml5wMh9HCdBG--