Re: Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: proposal - psql: possibility to specify sort for describe commands, when size is printed
Date: 2017-09-19 20:03:04
Message-ID: CAPpHfdsKZpkLWafrYFn9gW6DquciyXwMPDSQkZ=pGer_14FOQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 19, 2017 at 7:54 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
wrote:

> 2017-09-19 16:14 GMT+02:00 Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>:
>
>> On Fri, Sep 8, 2017 at 7:13 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
>> wrote:
>>
>>> 2017-08-16 14:06 GMT+02:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>>>
>>>> Hi
>>>>
>>>> 2017-08-15 4:37 GMT+02:00 Peter Eisentraut <
>>>> peter(dot)eisentraut(at)2ndquadrant(dot)com>:
>>>>
>>>>> On 3/11/17 07:06, Pavel Stehule wrote:
>>>>> > I am sending a updated version with separated sort direction in
>>>>> special
>>>>> > variable
>>>>>
>>>>> This patch also needs a rebase.
>>>>>
>>>>
>>>> I am sending rebased patch
>>>>
>>>
>>> rebased again + fix obsolete help
>>>
>>
>> For me, patch applies cleanly, builds and passed regression tests.
>> However, patch misses regression tests covering added functionality.
>>
>
> I am not sure if there are any tests related to output of \dt+ commands -
> there result is platform depend.
>

BTW, why isn't order by name_schema available for \dt? If it's available
we could at least cover this case by plain regression tests.
\dt+ could be covered by TAP tests, but it isn't yet. I think one day we
should add them. However, I don't think we should force you to write them
in order to push this simple patch.

Patch is definitely harmless, i.e. it doesn't affect anybody who doesn't
>> use new functionality.
>> But I still would prefer ordering to be options of \d* commands while
>> psql variables be defaults for those options...
>>
>
> I understand
>
> a) I don't think so commands like \dt++ (or similar) is good idea - these
> commands should be simple how it is possible
>

I don't particularly like \dt++, but second argument is probably an option.

> b) this patch doesn't block any other design - more it opens the door
> because the executive part will be implemented and users can have a
> experience with with different output sorts - so if people will need more
> quick change of result sort, then the work in this area will continue.
>

OK. As reviewer, I'm not going to block this patch if you see its
functionality limited by just psql variables.
I think you should add support of name_schema \dt and some regression tests
for this case, before I can mark this as "ready for committer".

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-09-19 20:12:00 Re: Patch: add --if-exists to pg_recvlogical
Previous Message Peter Eisentraut 2017-09-19 19:57:45 Re: Log LDAP "diagnostic messages"?