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.98.2) (envelope-from ) id 1xD7kv-00000000KTM-0BQM for pgsql-bugs@arkaria.postgresql.org; Sat, 03 Oct 2026 21:58:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xD7kt-00000003SmT-3l50 for pgsql-bugs@arkaria.postgresql.org; Sat, 03 Oct 2026 21:58:55 +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.98.2) (envelope-from ) id 1xD7kt-00000003SmL-2eLW for pgsql-bugs@lists.postgresql.org; Sat, 03 Oct 2026 21:58:55 +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.98.2) (envelope-from ) id 1xD7kr-00000000DZD-39BT for pgsql-bugs@lists.postgresql.org; Sat, 03 Oct 2026 21:58:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 693LwqJl261447; Sat, 3 Oct 2026 17:58:52 -0400 From: Tom Lane To: theshallow27@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19739: Parameterized first autocommit statement can have different `transaction_timestamp()` and `statement In-reply-to: <19739-bdca3e8fd9b496fa@postgresql.org> References: <19739-bdca3e8fd9b496fa@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 02 Oct 2026 22:37:31 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <261445.1791064732.1@sss.pgh.pa.us> Date: Sat, 03 Oct 2026 17:58:52 -0400 Message-ID: <261446.1791064732@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The documentation says `transaction_timestamp()` and > `statement_timestamp()` return the same value during the first statement of > a > transaction. With a parameterized query executed as the first command on a > fresh autocommit connection, they differ. Strictly speaking, that depends on which steps of an extended-protocol query count as separate statements. But I don't think we're going to modify this documentation to dive into details as abstruse as that; it would merely confuse the same people the comment is meant to help. regards, tom lane