Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

From: Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
To: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Kirk Wolak <wolakk(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Andrey Borodin <amborodin86(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Subject: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Date: 2023-02-23 18:15:54
Message-ID: CAOtHd0B8+FHsNKVGy8Bg39MX31eg2UpTUd1NxexZgVvOs-WUaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 23, 2023, 09:55 Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
wrote:

> On Thu, Feb 23, 2023 at 9:05 AM Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)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.

Thanks,
Maciek

>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sandro Santilli 2023-02-23 18:39:06 Re: Ability to reference other extensions by schema in extension scripts
Previous Message Nazir Bilal Yavuz 2023-02-23 18:06:26 Re: meson: Optionally disable installation of test modules