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 1uaybh-00CCSF-87 for pgsql-docs@arkaria.postgresql.org; Sun, 13 Jul 2025 15:27:13 +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 1uaybe-00GWYM-Js for pgsql-docs@arkaria.postgresql.org; Sun, 13 Jul 2025 15:27:11 +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 1uaybe-00GWYE-CK for pgsql-docs@lists.postgresql.org; Sun, 13 Jul 2025 15:27:11 +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.96) (envelope-from ) id 1uaybd-0075aD-0C for pgsql-docs@lists.postgresql.org; Sun, 13 Jul 2025 15:27:10 +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 56DFR6ng270192; Sun, 13 Jul 2025 11:27:06 -0400 From: Tom Lane To: Laurenz Albe cc: petermittere@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: please define 'statement' in the glossary In-reply-to: <15139c5d218754350e4870062f90ff0e85490290.camel@cybertec.at> References: <175223006802.3157505.14764328206246105568@wrigleys.postgresql.org> <15139c5d218754350e4870062f90ff0e85490290.camel@cybertec.at> Comments: In-reply-to Laurenz Albe message dated "Sun, 13 Jul 2025 16:58:57 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <270190.1752420426.1@sss.pgh.pa.us> Date: Sun, 13 Jul 2025 11:27:06 -0400 Message-ID: <270191.1752420426@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Laurenz Albe writes: > After looking at the code, I guess what made Tom add the remark in commit > eaf8f312c754 was the fact that an SQL statement is not necessarily processed > in a single go: with the extended query protocol (see chapter 52.2.3), > there is a "parse", a "bind" and an "execute" message from the client, and > each one sets the timestamp reported by statement_timestamp() to a new > value. So, technically, statement_timestamp() has a different value when > the statement is parsed than when it is executed. > However, what matters to the client is the value when the statement starts > executing, because that's the value that will be reported. > So I'd argue that we should remove the parenthetical remark. It confuses > more than it enlightens, and whoever needs to know that level of detail > had better read the code anyway. After re-reading that text, I feel like the parenthetical remark is fine, and the real problem is that I used "statement" and "command" more or less interchangeably in successive sentences. Perhaps s/command/statement/g throughout the paragraph would improve matters? Although "statement message" doesn't feel right, so maybe leave that one alone. regards, tom lane