Re: psql \d+ and oid display - Mailing list pgsql-hackers

From Robert Haas
Subject Re: psql \d+ and oid display
Date
Msg-id CA+TgmoY6nB6Jn_caw7fzHNB05PwAM-nkEt-1P=xeC983fZ5pRg@mail.gmail.com
Whole thread Raw
In response to Re: psql \d+ and oid display  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql \d+ and oid display  (Andres Freund <andres@2ndquadrant.com>)
Re: psql \d+ and oid display  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Tue, Apr 1, 2014 at 12:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian <bruce@momjian.us> wrote:
>>> The bottom line is we already have complex rules to display only what is
>>> _reasonable_.  If you want everything, you have to look at the system
>>> tables.
>
>> I don't really agree with that.  I understand that there's some
>> information (like dependencies) that you can't get through psql
>> because we don't really have a principled idea for what an interface
>> to that would look like, but I don't think that's a good thing.  Every
>> time I have to write a query by hand to get some information instead
>> of being able to get it through a backslash command, that slows me
>> down considerably.  But I'm lucky in that I actually know enough to do
>> that, which most users don't.  Information that you can't get through
>> \d+ just isn't available to a large percentage of our user base
>> without huge effort.  We shouldn't be stingy about putting stuff in
>> there that people may need to see.
>
> At least in this particular case, that's an uninteresting argument.
> We aren't being stingy with information, because the proposed new display
> approach provides *exactly the same information* as before.  (If you see
> the "Has OIDs" line, it's got OIDs, otherwise it doesn't.)  What we are
> being stingy about is display clutter, and I believe that's a good thing.

Although I agree with the general principle, I'm skeptical in this
case.  There are a bunch of table-level options, and I don't think
it's very reasonable to expect that users are going to remember which
ones are going to be displayed under which conditions, especially if
we change it from release to release.  If somebody doesn't see the
"has OIDs" line, are they going to conclude that the table doesn't
have OIDs, or are they going to conclude that psql doesn't ever
display that information and they need to query pg_class manually?
I'm sure at least some people will guess wrong.

Now, admittedly, this is not the hill I want to die on.  The future of
PostgreSQL doesn't rest on whatever ends up happening here.  But I
think what's going on on this thread is a lot of tinkering with stuff
that's not really broken.  I'm not saying "don't ever change psql
output".  What I'm saying is that changing psql output that is
absolutely fine the way it is does not represent meaningful progress.
The "replica identity" and "has OIDs" lines are a negligible
percentage of what \d+ spits out - in a test I just did, 2 out of 37
lines on \d+ pg_class.  I can't accept that tinkering with that is
reducing clutter in any meaningful way; it's just change for the sake
of change.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PATCH: decreasing memory needlessly consumed by array_agg
Next
From: Heikki Linnakangas
Date:
Subject: Re: GSoC proposal - "make an unlogged table logged"