Re: psql \d+ and oid display

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: David Johnston <polobo(at)yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql \d+ and oid display
Date: 2014-03-29 22:13:51
Message-ID: 5337459F.1080405@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 03/29/2014 06:10 PM, Bruce Momjian wrote:
> On Sat, Mar 29, 2014 at 05:10:49PM -0400, Andrew Dunstan wrote:
>> On 03/29/2014 04:49 PM, Bruce Momjian wrote:
>>> On Sat, Mar 29, 2014 at 09:59:36AM -0700, David Johnston wrote:
>>>> As my belief is that 99% of the uses of \d are for human consumption
>>>> (because machines should in most cases hit the catalogs directly) then
>>>> strictly displaying "Includes OIDs" when appropriate has my +1.
>>>>
>>>> Uses of \d+ in regression suites will be obvious and quickly fixed and
>>>> likely account for another 0.9%.
>>>>
>>>> psql backslash commands are not machine API contracts and should be adapted
>>>> for optimal human consumption; thus neutering the argument for maintaining
>>>> backward compatibility.
>>> One other issue --- we are adding conditional display of "Replica
>>> Identity" to psql \d+ in 9.4, so users processing \d+ output are already
>>> going to have to make adjustments for 9.4. That is another reason I am
>>> asking about this now.
>>>
>>
>> I think Tom's suggestion probably has the most support, although
>> it's not unanimous.
> Are you saying most people like "Has OIDs: yes", or the idea of just
> displaying _a_ line if there are OIDs? Based on default_with_oids,
> perhaps we should display "With OIDs".
>
> I agree it is no unanimous. I am curious how large the majority has to
> be to change a psql display value.
>

1. _a_ line.
2. Don't make it dependent on the GUC. If the table has OIDS then say
so, if not, say nothing.

As to majority size, I have no idea.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-03-29 22:16:19 Re: psql \d+ and oid display
Previous Message Andrew Dunstan 2014-03-29 22:10:57 Re: pgsql: Revert "Secure Unix-domain sockets of "make check" temporary clu