Re: Pasword expiration warning

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Gilles Darold <gilles(at)darold(dot)net>, Japin Li <japinli(at)hotmail(dot)com>, Yuefei Shi <shiyuefei1004(at)gmail(dot)com>, songjinzhou <tsinghualucky912(at)foxmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, liu xiaohui <liuxh(dot)zj(dot)cn(at)gmail(dot)com>, Steven Niu <niushiji(at)gmail(dot)com>
Subject: Re: Pasword expiration warning
Date: 2026-02-05 18:42:22
Message-ID: 4b380a18-42cc-4406-9484-efef10868f8c@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04.02.26 18:44, Zsolt Parragi wrote:
>>> Alternatively, just print the actual expiration timestamp.
>>
>> That crossed my mind, but I worried about timezone/formatting questions,
>> and I haven't found any examples of putting a timestamp in an error message
>> like this. Is it acceptable to use pg_strftime() in a translated string?
>
> Wouldn't that be more confusing?
>
> The password for role "foo" will expire at 2026-02-05 16:56"
>
> No matter which date format is used, this is harder to understand than
>
> The password for role "foo" will expire in 1 day(s)
>
> or
>
> The password for role "foo" will expire in 22 hour(s) 16 minute(s)
>
> All 3 are about a password expiring around the same time plus minus a
> few hours, but the first one is significantly harder to figure out,
> first I have to think about what's the exact date today.

I would personally definitely prefer the first one.

I have also previously complained about the buildfarm showing relative
instead of absolute timestamps, for similar reasons, but I was
apparently also in the minority then.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matheus Alcantara 2026-02-05 18:51:54 Re: Show expression of virtual columns in error messages
Previous Message Andres Freund 2026-02-05 18:02:17 Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible