public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: Peter Eisentraut <[email protected]>
To: Nikolay Samokhvalov <[email protected]>
To: Tom Lane <[email protected]>
To: Kirk Wolak <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: [email protected]
Cc: Laurenz Albe <[email protected]>
Subject: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Date: Thu, 23 Feb 2023 14:09:19 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CACLU5mSRwHr_8z=enMj-nXF1tmC7+Jn5heZQNiKuLyxYUtL2fg@mail.gmail.com>
	<[email protected]>
	<CANNMO+KqqM0YpVUmVDec+9nku9ai9T=Y5Tp=pZ0rp1jR3d8kqA@mail.gmail.com>
	<[email protected]>
	<[email protected]>

On 23/02/2023 13:20, Peter Eisentraut wrote:
> On 22.02.23 19:14, Heikki Linnakangas wrote:
>> How about a new backslash command or psql variable to show how long the
>> previous statement took? Something like:
> 
> If you don't have \timing turned on before the query starts, psql won't
> record what the time was before the query, so you can't compute the run
> time afterwards.  This kind of feature would only work if you always
> take the start time, even if \timing is turned off.

Correct. That seems acceptable though? gettimeofday() can be slow on 
some platforms, but I doubt it's *that* slow, that we couldn't call it 
two times per query.

- Heikki







view thread (18+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
  In-Reply-To: <[email protected]>

* 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