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 1qvwmh-008k2M-A0 for pgsql-docs@arkaria.postgresql.org; Thu, 26 Oct 2023 09:36:11 +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 1qvwmf-00FEQP-IN for pgsql-docs@arkaria.postgresql.org; Thu, 26 Oct 2023 09:36:09 +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 1qvwmf-00FEQ9-At for pgsql-docs@lists.postgresql.org; Thu, 26 Oct 2023 09:36:09 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qvwma-002NuQ-Q7 for pgsql-docs@lists.postgresql.org; Thu, 26 Oct 2023 09:36:08 +0000 Received: from [172.30.2.10] (unknown [172.30.2.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: m.yablokov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id DFD1AE20E62; Thu, 26 Oct 2023 12:36:02 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1698312962; bh=P6Mb+Zyi3gdnsOkZmLETkI7JJ9fwk/9oHX8CcPEcc1M=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=ARArCBeI4tcU/h+34UqfH+Z3rMWNpDlug7MDCVLCx03q+ESCI5s5SPocAr3grI3Ok A0LWYmoXdc3ctNRlKOU7FrGLiFT6IiSZtAmDNnau4bFf8EV2DBBAqzlDkbAOSFicSC V/I4yn2tUDzoFrRe+wGSQCnznfEwc4lgPkWFJgd/x0Vll9lu3e5NItyrvZFJKq7PHt 7/A75c2ZxubE7SZbDwOC838zRMxMC2g/cR4job8FK2SDR08lWdGLKzgHjqBP1xcz+f G10Cb8kFJkHP1H6yh5aXou4mkNJxh2CMaNhBGcDGVqKXSwYGNv92Az6r7vX0XnZ5NK qiX0gs9GITGcw== Content-Type: multipart/alternative; boundary="------------VECgGUmeZdVCtZddKAXG4eO1" Message-ID: Date: Thu, 26 Oct 2023 12:36:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Example 43.6. A PL/pgSQL Trigger Function for Maintaining a Summary Table Content-Language: en-US To: Daniel Gustafsson Cc: pgsql-docs@lists.postgresql.org References: <70f74895-8512-4b2f-8617-2ac0ebcd2e87@postgrespro.ru> <99AC5F34-FDB6-42A8-867A-CF97F0707F9B@yesql.se> From: Maxim Yablokov Organization: Postgres Professional In-Reply-To: <99AC5F34-FDB6-42A8-867A-CF97F0707F9B@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------VECgGUmeZdVCtZddKAXG4eO1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Yeah, sure thing! Thanks! I'll send a patch soon. 26.10.2023 12:29, Daniel Gustafsson пишет: >> On 26 Oct 2023, at 09:33, Maxim Yablokov wrote: >> Example 43.6 on the pagehttps://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 > -- Best regards, Maxim Yablokov Technical writer-translator Postgres Professional --------------VECgGUmeZdVCtZddKAXG4eO1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Yeah, sure thing! Thanks! I'll send a patch soon.

26.10.2023 12:29, Daniel Gustafsson пишет:
On 26 Oct 2023, at 09:33, Maxim Yablokov <m.yablokov@postgrespro.ru> 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

--
Best regards,
Maxim Yablokov
Technical writer-translator
Postgres Professional
--------------VECgGUmeZdVCtZddKAXG4eO1--