Re: Pasword expiration warning

From: Yuefei Shi <shiyuefei1004(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Gilles Darold <gilles(at)darold(dot)net>, songjinzhou <tsinghualucky912(at)foxmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, liu xiaohui <liuxh(dot)zj(dot)cn(at)gmail(dot)com>
Subject: Re: Pasword expiration warning
Date: 2026-01-09 06:10:47
Message-ID: CAD43U4WHJm=UkxbfhxQRxQRxtdtu7AGj77uO2fF78THQWCaYTg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A few review comments for V8.

===
1.

+ if (password_expire_warning > 0 && vuntil < PG_INT64_MAX)
+ {
+ TimestampTz result = (vuntil - now) / USECS_PER_SEC; /* in seconds */
+
+ if (result <= (TimestampTz) password_expire_warning)
+ MyClientConnectionInfo.warning_message =
+ psprintf("your password will expire in %d day(s)", (int)
(result / 86400));
+ }

Please consider localization of the warning message.

2. typo fix

a. `Controls how many time ...` should be `Controls how much time ...`.

b. `Sets how many time before password expire to emit ...` should be
`Sets how much time before password expires to emit ...`

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message li carol 2026-01-09 06:17:20 回复: Correct comment wording in extension.c
Previous Message Japin Li 2026-01-09 06:04:49 Re: [PATCH] Add pg_get_role_ddl() functions for role recreation