Re: Things I don't like about \du's "Attributes" column

Pavel Luzanov <p.luzanov@postgrespro.ru>

From: Pavel Luzanov <p.luzanov@postgrespro.ru>
To: Isaac Morland <isaac.morland@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2023-12-31T10:52:28Z
Lists: pgsql-hackers
On 30.12.2023 17:33, Isaac Morland wrote:
> Would it make sense to make the column non-nullable and always set it 
> to infinity when there is no expiry?

A password is not required for roles. In many cases, external 
authentication is used in ph_hba.conf.
I think it would be strange to have 'infinity' for roles without a password.

Tom suggested to have 'infinity' in the \du output for roles with a 
password.
My doubt is that this will hide the real values (absence of values). So 
I suggested a separate column
'Has password?' to show roles with password and unmodified column 
'Password expire time'.

Yes, it's easy to replace NULL with "infinity" for roles with a 
password, but why?
What is the reason for this action? Absence of value for 'expire time' 
clear indicates that there is no time limit.
Also I don't see a practical reasons to execute next command, since it 
do nothing:

ALTER ROLE .. PASSWORD 'infinity';

So I think that in most cases there is no "infinity" in the 
rolvaliduntil column.

But of course, I can be wrong.

Thank you for giving your opinion.

-- 
Pavel Luzanov
Postgres Professional:https://postgrespro.com