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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Nasby <jim(dot)nasby(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Things I don't like about \du's "Attributes" column
Date: 2024-07-16 17:11:29
Message-ID: CAKFQuwbmkPtLvXwOnwb=FZxL3iow2HJDQFTuV9kzODkW2sZhgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 16, 2024 at 8:00 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> I'm starting to have some doubts about whether this effort is really
> worthwhile. It seems like what we have right now is a patch which uses
> both more horizontal space and more vertical space than the current
> implementation, without (IMHO) really offering any clear advantage.

It's simple enough to only add the mandatory vertical space here (and
definitely reduce the width) by leaving the current presentation of "N
connections" and "password valid until" unchanged but give them their own
line in Attributes like all of the rest. The choice to move them to their
own columns seems like where the contention lies.

e.g.,

regress_du_role0 | yes | Inherit | Tue Jun 04 00:00:00 2024 PDT
| 0 |

becomes
No connections allowed +|
Inherit +|
Password valid until Tue Jun 04 ... |

(pending confirmation of where the new inherit label fits slot-wise)

versus:

regress_du_role0 | No connections
+|
| Password valid until 2024-06-04 00:00:00+03
|

(Which actually look the same because of the automatic wrapping on the
current version versus explicit one-per-line in the proposed.)

In short, fix the complaint about comma-separated attributes and leave the
rest alone as being accurate reflections of the catalog. In short, from
the original message, do "a" without "b". Tom suggested "either" as well
and I agree with Robert that having done both we've made it both wider and
taller which ends up not being a great outcome.

Also, address the N connections [allowed] to make it clear this is a static
configuration and not some derivation of current state.

Can also deal with Password valid until infinity if a better phrasing can
be thought up that doesn't require knowledge of whether a password has been
set or not.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2024-07-16 17:16:27 Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal
Previous Message Tom Lane 2024-07-16 16:48:40 Re: [PATCH] Refactor pqformat.{c,h} and protocol.h