Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Date
Msg-id CAFj8pRCR89CWCyG7GHB4PE_m8ZHVDtH0=Ey0-Spzsp7hnCYK3w@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)  (Maciek Sakrejda <m.sakrejda@gmail.com>)
List pgsql-hackers


čt 23. 2. 2023 v 19:16 odesílatel Maciek Sakrejda <m.sakrejda@gmail.com> napsal:
On Thu, Feb 23, 2023, 09:55 Nikolay Samokhvalov <samokhvalov@gmail.com> wrote:
On Thu, Feb 23, 2023 at 9:05 AM Maciek Sakrejda <m.sakrejda@gmail.com> wrote:
I think Heikki's solution is probably more practical since (1) ..

Note that these ideas target two *different* problems:
- what was the duration of the last query
- when was the last query executed

So, having both solved would be ideal.

Fair point, but since the duration solution needs to capture two timestamps anyway, it could print start time as well as duration.

The prompt timestamp could still be handy for more intricate session forensics, but I don't know if that's a common-enough use case.


It is hard to say what is a common enough case, but I cannot imagine more things than this. 

small notice - bash has special support for this

Regards

Pavel


Thanks,
Maciek

pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: verbose mode for pg_input_error_message?
Next
From: Stephen Frost
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER