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

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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>, 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-22 19:42:15
Message-ID: 20230222194215.GA144567@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 22, 2023 at 07:17:37PM +0100, Daniel Gustafsson wrote:
>> On 22 Feb 2023, at 19:14, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
>> How about a new backslash command or psql variable to show how long the previous statement took? Something like:
>>
>> postgres=# select <unexpectedly slow query>
>> ?column?
>> ----------
>> 123
>> (1 row)
>>
>> postgres=# \time
>>
>> Time: 14011.975 ms (00:14.012)
>>
>> This would solve the "I forgot to time something" problem.
>
> I don't have an opinion on adding a prompt option, but I've wanted this
> (without realizing this was the format of it) many times.

+1

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2023-02-22 19:43:20 Re: [PATCH] Fix unbounded authentication exchanges during PQconnectPoll()
Previous Message Andres Freund 2023-02-22 19:33:09 Re: meson and sslfiles.mk in src/test/ssl/