Re: please define 'statement' in the glossary - Mailing list pgsql-docs

From Tom Lane
Subject Re: please define 'statement' in the glossary
Date
Msg-id 690858.1752509326@sss.pgh.pa.us
Whole thread Raw
In response to Re: please define 'statement' in the glossary  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: please define 'statement' in the glossary
List pgsql-docs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Cannot readily test this presently but I wonder what the following produces:

> psql -c "begin; select statement_timestamp(), transaction_timestamp();
> select statement_timestamp(), transaction_timestamp(); commit; begin;
> select statement_timestamp(), transaction_timestamp(); commit;"

> Transaction timestamp should progress while statement timestamp should not,
> right?

AFAICT neither one progresses.  I think the reason is that (1)
statement timestamp is set by arrival of the command message
and (2) transaction timestamp is set by copying statement timestamp
at the moment of beginning a transaction.

            regards, tom lane



pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: please define 'statement' in the glossary
Next
From: "David G. Johnston"
Date:
Subject: Re: please define 'statement' in the glossary