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 1ub4gv-00DRUQ-T0 for pgsql-docs@arkaria.postgresql.org; Sun, 13 Jul 2025 21:57:01 +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 1ub4gs-001H8e-Jb for pgsql-docs@arkaria.postgresql.org; Sun, 13 Jul 2025 21:56:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ub4gs-001H8W-C7 for pgsql-docs@lists.postgresql.org; Sun, 13 Jul 2025 21:56:59 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ub4gq-007P09-2A for pgsql-docs@lists.postgresql.org; Sun, 13 Jul 2025 21:56:58 +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 56DLurSd458205; Sun, 13 Jul 2025 17:56:53 -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: <456003.1752442676@sss.pgh.pa.us> References: <175223006802.3157505.14764328206246105568@wrigleys.postgresql.org> <15139c5d218754350e4870062f90ff0e85490290.camel@cybertec.at> <270191.1752420426@sss.pgh.pa.us> <097e693ea6cc3541cbcd72c915d7d492c26930c0.camel@cybertec.at> <456003.1752442676@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 13 Jul 2025 17:37:56 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <458185.1752443800.0@sss.pgh.pa.us> Date: Sun, 13 Jul 2025 17:56:53 -0400 Message-ID: <458204.1752443813@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <458185.1752443800.1@sss.pgh.pa.us> ... so concretely, about like this? regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="v1-docs-clarify-current-timestamp-functions.patch"; charset="us-ascii" Content-ID: <458185.1752443800.2@sss.pgh.pa.us> Content-Description: v1-docs-clarify-current-timestamp-functions.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 6b327d4fd81..ed30dbe7ccd 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -11244,13 +11244,13 @@ now() CURRENT_TIMESTAMP, but is named to clearly refle= ct what it returns. statement_timestamp() returns the start time of = the current - statement (more specifically, the time of receipt of the latest comma= nd + statement (more specifically, the time of receipt of the latest proto= col message from the client). statement_timestamp() and transaction_= timestamp() - return the same value during the first command of a transaction, but = might - differ during subsequent commands. + return the same value during the first statement of a transaction, bu= t might + differ during subsequent statements. clock_timestamp() returns the actual current tim= e, and - therefore its value changes even within a single SQL command. + therefore its value changes even within a single SQL statement. timeofday() is a historical PostgreSQL function. Like clock_timestamp(), it returns the actual current= time, ------- =_aaaaaaaaaa0--