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 1qvwgc-008jIk-PV for pgsql-docs@arkaria.postgresql.org; Thu, 26 Oct 2023 09:29:54 +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 1qvwga-00FBda-DF for pgsql-docs@arkaria.postgresql.org; Thu, 26 Oct 2023 09:29:52 +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 1qvwga-00FBdS-1N for pgsql-docs@lists.postgresql.org; Thu, 26 Oct 2023 09:29:52 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvwgS-002NsJ-6l for pgsql-docs@lists.postgresql.org; Thu, 26 Oct 2023 09:29:50 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 981082FB7CAE for ; Thu, 26 Oct 2023 11:29:41 +0200 (CEST) Received: from s980.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 88D392E2754B; Thu, 26 Oct 2023 11:29:41 +0200 (CEST) Received: from s898.loopia.se (unknown [172.22.191.6]) by s980.loopia.se (Postfix) with ESMTP id 876F222016B3; Thu, 26 Oct 2023 11:29:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.01 X-Spam-Level: X-Spam-Status: No, score=-1.01 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=disabled Received: from s934.loopia.se ([172.22.191.6]) by s898.loopia.se (s898.loopia.se [172.22.190.17]) (amavisd-new, port 10024) with UTF8LMTP id xUmdNO_ogZQX; Thu, 26 Oct 2023 11:29:41 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s934.loopia.se (Postfix) with ESMTPSA id 07A647CEAD0; Thu, 26 Oct 2023 11:29:41 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: Example 43.6. A PL/pgSQL Trigger Function for Maintaining a Summary Table From: Daniel Gustafsson In-Reply-To: <70f74895-8512-4b2f-8617-2ac0ebcd2e87@postgrespro.ru> Date: Thu, 26 Oct 2023 11:29:40 +0200 Cc: pgsql-docs@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <99AC5F34-FDB6-42A8-867A-CF97F0707F9B@yesql.se> References: <70f74895-8512-4b2f-8617-2ac0ebcd2e87@postgrespro.ru> To: Maxim Yablokov X-Mailer: Apple Mail (2.3696.120.41.1.3) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 26 Oct 2023, at 09:33, Maxim Yablokov = wrote: > Example 43.6 on the page = https://www.postgresql.org/docs/16/plpgsql-trigger.html has two tables = called main. But it seems that the table time_dimension is not used any = further, it's a bit strange for one of main tables of the example. Am I = missing something, or should this example be extended (or reduced)? Interesting catch, time_dimension has been unused since introduced with = commit a294726bc1d (in 2005), and the archives doesn't provide any further = insights. While I don't have access to the book referred to for the example, we = don't expect our readers to either so it seems to me that we could remove it = from the example to avoid risk of confusion. Would you like to propose a patch = for this? -- Daniel Gustafsson