Re: proposal - psql - show longest tables

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal - psql - show longest tables
Date: 2013-07-23 05:12:53
Message-ID: CAFj8pRDmsnd0dZUXQkuiHyF7pW64YY3fbJZZOJm=HNcM+9xncg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2013/7/23 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Sun, Jul 21, 2013 at 12:47 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>> I propose a few new commands
>>>
>>> \dts [N|size] ... show N largest tables | show tables larger than size
>>> ordered by size
>>> \dis [N|size] ... show N largest indexes | show indexes larger than
>>> size ordered by size
>>> \dtst [N|size] ... show N largest total size | show tables where total
>>> size is larger than size ordered by total size
>>> \dtr [N] ... show N largest tables (ordered by rows)
>
>> I think our \d commands are in inscrutable morass of indecipherable
>> gobbledygook as it is, and this is only one more step down the road to
>> complete insanity. :-(
>
> Indeed. At least in this particular design, there is no sane way to
> tell the difference between this family of commands and the \dtisv
> family --- which has completely different behavior, starting with what
> it thinks the argument means. Even if you can come up with some
> arguably logical rule for the code to use, users will never remember
> which is which. In fact, the first three of those already have defined
> meanings, and while the fourth does not AFAIR, the current psql code
> nonetheless takes it, ignoring the "r".
>
> Even if we thought the functionality was worth the trouble, which I
> continue to doubt, this particular syntax proposal is a disaster.

I disagree - if it works well for vim editor, then it should to work
in psql too.

There is not too much other possibilities, how to implement TUI interface :(

Regards

Pavel
>
> regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2013-07-23 05:18:43 Re: Auto explain target tables
Previous Message Tom Lane 2013-07-23 05:10:35 Re: Review: UNNEST (and other functions) WITH ORDINALITY