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

From: Kirk Wolak <wolakk(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Date: 2023-03-02 15:40:54
Message-ID: CACLU5mRS4u5pz6rioDQdpRZj=2APDgsZvXN7mDx1jsk99qbp8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 2, 2023 at 9:56 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:

> On Wed, 2023-03-01 at 11:13 -0500, Kirk Wolak wrote:
> > Thanks, corrected, and confirmed Unix line endings.
>
> The patch builds fine and works as intended.
>
> I leave it to the committers to decide whether the patch is worth the
> effort or not, given that you can get a similar effect with %`date`.
> It adds some value by being simpler and uniform across all platforms.
>
> I'll mark the patch as "ready for committer".
>
> Yours,
> Laurenz Albe
>

Thanks Laurenz.

To be clear, I use windows AND linux, and I share my file between them.

in linux: `date +%H:%M:%S` is used
in windows: `ECHO %time%`

so, I wrote a ts.cmd and ts.sh so I could share one prompt: `ts`
but now every time I connect a new account to this file, I have to go
find/copy my ts file.
Same when I share it with other developers.

This was the pain that started the quest.
Thanks to everyone for their support!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2023-03-02 16:17:05 Re: Add pg_walinspect function with block info columns
Previous Message Laurenz Albe 2023-03-02 15:39:16 Re: Allow tailoring of ICU locales with custom rules