Re: psql \d+ and oid display

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, David Johnston <polobo(at)yahoo(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql \d+ and oid display
Date: 2014-04-01 16:01:48
Message-ID: CA+Tgmobq8z2F22hXQZQUVMsOvNnHQYBbOUdJHurkDx3ibDHpSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 1, 2014 at 11:42 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Tue, Apr 1, 2014 at 11:30:54AM -0400, Robert Haas wrote:
>> > OK, I have now applied the conditional display of "Replica Identity"
>> > patch (which is how it was originally coded anyway). The attached patch
>> > matches Tom's suggestion of displaying the same OID text, just
>> > conditionally.
>> >
>> > Seeing psql \d+ will have a conditional display line in PG 9.4, making
>> > OIDs conditional seems to make sense.
>>
>> Frankly, I think this is all completely wrong-headed. \d+ should
>> display *everything*. That's what the + means, isn't it? Coming up
>> with complex rules for which things get shown and which things get
>> hidden just makes the output harder to understand, without any
>> compensating benefit.
>
> Well, there are lot of _other_ things we could display about the table
> that we don't. Are you suggesting we add those too? What about
> "Replica Identity"? Should that always display?

In \d+, I think it absolutely should.

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

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-01 16:05:44 Re: psql \d+ and oid display
Previous Message Robert Haas 2014-04-01 15:56:46 Re: PQputCopyData dont signal error