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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Дата
Msg-id 3673996.1681005278@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)  (Greg Stark <stark@mit.edu>)
Ответы Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> I'm not sure if the *prompt* is a sensible place for it though. The
> place it seems like it would be most useful is reading the output of
> script executions where there would be no prompts. Perhaps it's the
> command tags and \echo statements that should be timestamped.

Hmm, that is an interesting idea.  I kind of like it, not least because
it eliminates most of the tension between wanting a complete timestamp
and wanting a short prompt.  Command tags are short enough that there's
plenty of room.

> And I think experience shows that there are three reasonable formats
> for dates, the default LC_TIME format, ISO8601, and a relative
> "seconds (with milliseconds) since starting". I think having a feature
> that doesn't support those three would feel incomplete and eventually
> need to be finished.

Yeah, I don't believe that one timestamp format is going to satisfy
everyone.  But that was especially true when trying to wedge it
into the prompt, where the need for brevity adds more constraints.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Commitfest 2023-03 starting tomorrow!
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Direct I/O