Re: Pasword expiration warning

Zsolt Parragi <zsolt.parragi@percona.com>

From: Zsolt Parragi <zsolt.parragi@percona.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>, Euler Taveira <euler@eulerto.com>, Peter Eisentraut <peter@eisentraut.org>, Gilles Darold <gilles@darold.net>, japin <japinli@hotmail.com>, Yuefei Shi <shiyuefei1004@gmail.com>, songjinzhou <tsinghualucky912@foxmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Andrew Dunstan <andrew@dunslane.net>, Tom Lane <tgl@sss.pgh.pa.us>, liu xiaohui <liuxh.zj.cn@gmail.com>, Steven Niu <niushiji@gmail.com>
Date: 2026-02-06T09:53:43Z
Lists: pgsql-hackers
> Eh, there are lots of examples of setting the default value in both the GUC
> definition and the variable declaration.  TBH I've always found excessive
> macro use to hinder readability more than it helps anything.

One thing that would help is readability, as macros/constants usually
have nice explanatory names. That could be improved by adding a "/* 7
days in seconds */" comment after the number, without a macro. But if
somebody searches for the guc name, it's already defined as 7d
elsewhere, so I'm not sure if this would be really useful.

The patch looks good to me.



Commits

  1. Add password expiration warnings.