public inbox for [email protected]  
help / color / mirror / Atom feed
From: Yuefei Shi <[email protected]>
To: Japin Li <[email protected]>
Cc: Gilles Darold <[email protected]>
Cc: songjinzhou <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Bossart, Nathan <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: liu xiaohui <[email protected]>
Subject: Re: Pasword expiration warning
Date: Fri, 9 Jan 2026 14:10:47 +0800
Message-ID: <CAD43U4WHJm=UkxbfhxQRxQRxtdtu7AGj77uO2fF78THQWCaYTg@mail.gmail.com> (raw)
In-Reply-To: <MEAPR01MB303142AEB3F47886C171194EB682A@MEAPR01MB3031.ausprd01.prod.outlook.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<MEAPR01MB3031B4F594E62343BF1F8EDBB684A@MEAPR01MB3031.ausprd01.prod.outlook.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<MEAPR01MB3031D75330A64DD25A5B8A04B685A@MEAPR01MB3031.ausprd01.prod.outlook.com>
	<[email protected]>
	<MEAPR01MB30311B76AFD06D3CAEAEF9C7B685A@MEAPR01MB3031.ausprd01.prod.outlook.com>
	<[email protected]>
	<MEAPR01MB303185AAA6F5BF90759D5E86B685A@MEAPR01MB3031.ausprd01.prod.outlook.com>
	<[email protected]>
	<MEAPR01MB303142AEB3F47886C171194EB682A@MEAPR01MB3031.ausprd01.prod.outlook.com>

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 ...`


view thread (27+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Pasword expiration warning
  In-Reply-To: <CAD43U4WHJm=UkxbfhxQRxQRxtdtu7AGj77uO2fF78THQWCaYTg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox