From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, 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-22 13:16:35 |
Message-ID: | CAFj8pRCsFHbkL6446MGTfnhq2+u7g8ATEta+qLdohubgOu6-ew@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2017-09-21 20:30 GMT+02:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>
>
> 2017-09-21 20:20 GMT+02:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)
> com>:
>
>> On 9/21/17 13:54, Pavel Stehule wrote:
>> > I see where you are coming from, but there is no association in the
>> > existing UI that equates "+" to the word "verbose". I think just
>> > removing the verbose prefix and applying the sorting behavior in all
>> > cases should be easier to explain and implement.
>> >
>> > I though about it - but I am not sure if one kind of these variables is
>> > practical.
>> >
>> > if I don't need a size, then sort by schema, name is ok (I didn't need
>> > any else ever). With only one kind of these variables, this setting is
>> > common - what is not practical.
>>
>> But you are proposing also to add a variable configuring the sort
>> direction. It would be weird that \dX+ observed the sort direction but
>> \dX did not.
>>
>
> yes and no.
>
> schema_name, name_schema or SORT_DIRECTION has sense for both type of
> commands.
>
> size sort has sense only for \dX+ command.
>
> I am thinking about solution and the most clean I see two distinct
> variables:
>
> SORT_COLUMNS and VERBOSE_SORT_COLUMNS
>
> when VERBOSE_SORT_COLUMNS will be undefined, then SORT_COLUMNS is used for
> \dX+ command too.
>
> Is it acceptable?
>
I though more about it, and I am thinking so this direction is not good.
Example: somebody set SORT_COLUMNS to schema_name value. This is nonsense
for \l command
Now, I am thinking so more correct and practical design is based on special
mode, activated by variable
PREFER_SIZE_SORT .. (off, asc, desc)
This has sense for wide group of commands that can show size. And when size
is not visible, then this option is not active.
What do you think about this proposal?
Regards
Pavel
>
>
>
>> --
>> Peter Eisentraut http://www.2ndQuadrant.com/
>> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sokolov Yura | 2017-09-22 13:22:16 | Re: GUC for cleanup indexes threshold. |
Previous Message | Ashutosh Bapat | 2017-09-22 13:06:52 | Re: Partition-wise join for join between (declaratively) partitioned tables |