From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, petermittere(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: please define 'statement' in the glossary |
Date: | 2025-07-14 17:09:24 |
Message-ID: | 697664.1752512964@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> Ok. That explains why "statement_timestamp() and transaction_timestamp()
> return the same value during the first command of a transaction," isn't
> just stating the obvious. transaction_timestamp() literally returns the
> value statement_timestamp().
Right. I'm tempted to be more explicit about that, along the lines of
<function>statement_timestamp()</function> and <function>transaction_timestamp()</function>
- return the same value during the first statement of a transaction, but might
- differ during subsequent statements.
+ return the same value during the first statement of a transaction,
+ because the transaction timestamp is set by copying the statement
+ timestamp when a new transaction starts.
I didn't include that change below though; perhaps it has too much
whiff of implementation detail.
> I'm fine with this entire section assuming/stating that extended protocol
> is in effect and that 53.2.2.1 explains how these behave when executing a
> multi-statement simple protocol "script".
It's incorrect to claim that this only applies to extended protocol,
and besides I thought you didn't want to mention protocol details
here. I can't argue with documenting it in the protocol chapter
though. So about like this?
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
v2-docs-clarify-current-timestamp-functions.patch | text/x-diff | 2.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2025-07-14 17:31:41 | Re: please define 'statement' in the glossary |
Previous Message | Fujii Masao | 2025-07-14 16:51:30 | Re: Clarify VACUUM FULL exclusion in total_vacuum_time docs |