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

Поиск
Список
Период
Сортировка
От Nikolay Samokhvalov
Тема Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Дата
Msg-id CANNMO++9ZauZ7tZFO6vcc_Kah7UysLpYP94XQtGVA12hwnoiAQ@mail.gmail.com
обсуждение исходный текст
Ответ на Proposal: %T Prompt parameter for psql for current time (like Oracle has)  (Kirk Wolak <wolakk@gmail.com>)
Список pgsql-hackers
On Wed, Feb 22, 2023 at 9:18 AM Kirk Wolak <wolakk@gmail.com> wrote:
Proposal:  Simply add the %T (PROMPT variable) to output the current time (HH24:MI:SS) into the prompt.  This has been in sqlplus since I can remember, and I find it really useful when I forgot to time something, or to review for Time spent on a problem, or for how old my session is...

This is a great idea, in my opinion. I usually do something involving ts to track timestamps when executing something non-trivial via psql in interactive (see below) or non-interactive mode. 

But this is a not well-known thing to use (and ts is not installed by default on Ubuntu, etc.) – having timestamps in prompt would be convenient.

test=> \o | ts
test=> select 1;
test=> Feb 22 09:49:49  ?column?
Feb 22 09:49:49 ----------
Feb 22 09:49:49         1
Feb 22 09:49:49 (1 row)
Feb 22 09:49:49

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: meson and sslfiles.mk in src/test/ssl/
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)