agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: petermittere@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: please define 'statement' in the glossary
Date: Sun, 13 Jul 2025 11:27:06 -0400
Message-ID: <270191.1752420426@sss.pgh.pa.us> (raw)
In-Reply-To: <15139c5d218754350e4870062f90ff0e85490290.camel@cybertec.at>
References: <175223006802.3157505.14764328206246105568@wrigleys.postgresql.org>
	<15139c5d218754350e4870062f90ff0e85490290.camel@cybertec.at>

Laurenz Albe <laurenz.albe@cybertec.at> 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





view thread (21+ messages)  latest in thread

Message-ID: <270191.1752420426@sss.pgh.pa.us>
Permalink:  ../270191.1752420426@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/270191.1752420426@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, petermittere@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: please define 'statement' in the glossary
  In-Reply-To: <270191.1752420426@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox