From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
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-03-10 15:01:13 |
Message-ID: | CAFj8pRAQ9RG2MoCVUG9mKbD83eh75_JJNu3n1CJWbcqCUx43VA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2017-03-10 15:16 GMT+01:00 Stephen Frost <sfrost(at)snowman(dot)net>:
> * Peter Eisentraut (peter(dot)eisentraut(at)2ndquadrant(dot)com) wrote:
> > On 2/24/17 16:32, Pavel Stehule wrote:
> > > set EXTENDED_DESCRIBE_SORT size_desc
> > > \dt+
> > > \l+
> > > \di+
> > >
> > > Possible variants: schema_table, table_schema, size_desc, size_asc
> >
> > I can see this being useful, but I think it needs to be organized a
> > little better.
> >
> > Sort key and sort direction should be separate settings.
> >
> > I'm not sure why we need to have separate settings to sort by schema
> > name and table name. But if we do, then we should support that for all
> > object types. I think maybe that's something we shouldn't get into
> > right now.
> >
> > So I would have one setting for sort key = {name|size} and on for sort
> > direction = {asc|desc}.
>
> Perhaps I'm trying to be overly cute here, but why not let the user
> simply provide a bit of SQL to be put at the end of the query?
>
> That is, something like:
>
> \pset EXTENDED_DESCRIBE_ORDER_LIMIT 'ORDER BY 5 DESC LIMIT 10'
>
For example - the size is displayed in pretty form - raw form is not
displayed - so simple ORDER BY clause is not possible.
But setting LIMIT is not bad idea - although it is probably much more
complex for implementation.
\pset DESCRIBE_LIMIT 100
\pset EXTENDED_DESCRIBE_LIMIT 100
can be implemented as next step
Regards
Pavel
>
> Thanks!
>
> Stephen
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-03-10 15:02:34 | Re: some dblink refactoring |
Previous Message | Alexander Korotkov | 2017-03-10 15:00:14 | Re: Re: proposal - psql: possibility to specify sort for describe commands, when size is printed |