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 CAFj8pRCP9aQsaPBZ-P9U1Pwxd5X2wPJVn6SnKo_mHM8qy7c1_A@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi

st 22. 2. 2023 v 18:55 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
Kirk Wolak <wolakk@gmail.com> writes:
> Proposal:  Simply add the %T (PROMPT variable) to output the current time
> (HH24:MI:SS) into the prompt.

I'm not really convinced that %`date` isn't a usable solution for this,
especially since it seems like a very niche requirement.  The next
person who wants it might well have a different desire than you
for exactly what gets shown.  The output of date can be customized,
but a hard-wired prompt.c feature not so much.

On the whole I'd rather not eat more of the limited namespace for
psql prompt codes for this.

Can we introduce some special syntax that allows using words (and maybe some params)?

Regards

Pavel
 

                        regards, tom lane

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Next
From: Pavel Stehule
Date:
Subject: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)