ne 7. 4. 2019 v 21:13 odesílatel Alvaro Herrera <alvhe...@2ndquadrant.com> napsal:
> On 2019-Apr-07, Pavel Stehule wrote: > > > ne 7. 4. 2019 v 20:27 odesílatel Alvaro Herrera < > alvhe...@2ndquadrant.com> > > napsal: > > > > In order for this to display sanely, I added the "Parent name" column > if > > > either the "n" flag is shown or a pattern is given (previously it only > > > appeared in the former case). > > > > I am thinking about it and original behave and this new behave should be > > expected (and unexpected too). We can go this way - I have not > > counter-arguments, but yes, it is more consistent with some other > commands, > > pattern disables some other constraints. > > > > It should be documented - Using any pattern in this case forces 'n' flag. > > Added to the docs, and pushed. > Thank you very much > I couldn't resist tweaking the ORDER BY clause, too. I think listing > all tables first, followed by all indexes, and sorting by parent in each > category, is much easier to read. (Maybe this can use additional > tweaking, but it's a minor thing anyway -- for example putting together > all indexes that correspond to some particular table?) > > I noticed that \d never seems to use pg_total_relation_size, so toast > size is never shown. I did likewise here too and used pg_table_size > everywhere. I'm not 100% sure this is the most convenient thing. Maybe > we need yet another column, and/or yet another flag ...? > I prefer some flag - both raw size and total size has sense, but another column will be less readable > > Also, I think the new \dP should gain a new flag (maybe "l") to make it > list leaf tables/indexes too with their local sizes, and remove those > from the standard \d listing. > +1 Pavel > > -- > Álvaro Herrera https://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >