Re: please define 'statement' in the glossary
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: petermittere@gmail.com, pgsql-docs@lists.postgresql.org
Date: 2025-07-13T15:27:06Z
Lists: pgsql-docs
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
Commits
-
Doc: clarify description of current-date/time functions.
- 0e2cc385b97e 13.22 landed
- 209a22d794d5 14.19 landed
- 5ea9d9ac0c33 15.14 landed
- 2e7390928e80 16.10 landed
- bdb052f53b1a 17.6 landed
- c33e55ac91d2 18.0 landed
- 8ffd9ac3b206 19 (unreleased) landed
-
Some editorial work on the documentation of the current-date/time
- eaf8f312c754 8.2.0 cited