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

2017-11-01 Thread Pavel Stehule
Hi In general, this approach looks good for me. > Regarding current state of patch, I'd like to see new options documented. > Also, it would be better to replace "bool sort_size" with enum assuming > there could be other sorting orders in future. > I am sending updated patch with some basic doc

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

2017-10-31 Thread Alexander Korotkov
On Sun, Oct 29, 2017 at 12:47 AM, Pavel Stehule wrote: > 2017-10-28 23:35 GMT+02:00 Alexander Korotkov : > >> On Sat, Oct 28, 2017 at 3:46 PM, Pavel Stehule >> wrote: >> >>> 2017-09-22 21:31 GMT+02:00 Pavel Stehule

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

2017-10-28 Thread Pavel Stehule
2017-10-28 23:35 GMT+02:00 Alexander Korotkov : > On Sat, Oct 28, 2017 at 3:46 PM, Pavel Stehule > wrote: > >> 2017-09-22 21:31 GMT+02:00 Pavel Stehule : >> >>> >>> >>> 2017-09-22 21:12 GMT+02:00 Peter Eisentraut < >>>

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

2017-10-28 Thread Alexander Korotkov
On Sat, Oct 28, 2017 at 3:46 PM, Pavel Stehule wrote: > 2017-09-22 21:31 GMT+02:00 Pavel Stehule : > >> >> >> 2017-09-22 21:12 GMT+02:00 Peter Eisentraut < >> peter.eisentr...@2ndquadrant.com>: >> >>> On 9/22/17 09:16, Pavel Stehule wrote: >>> >

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

2017-10-28 Thread Pavel Stehule
Hi 2017-09-22 21:31 GMT+02:00 Pavel Stehule : > > > 2017-09-22 21:12 GMT+02:00 Peter Eisentraut com>: > >> On 9/22/17 09:16, Pavel Stehule wrote: >> > Example: somebody set SORT_COLUMNS to schema_name value. This is >> > nonsense for \l

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

2017-09-22 Thread Pavel Stehule
2017-09-22 21:12 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 9/22/17 09:16, Pavel Stehule wrote: > > 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 >

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

2017-09-22 Thread Peter Eisentraut
On 9/22/17 09:16, Pavel Stehule wrote: > 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

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

2017-09-22 Thread Pavel Stehule
2017-09-21 20:30 GMT+02:00 Pavel Stehule : > > > 2017-09-21 20:20 GMT+02:00 Peter Eisentraut 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

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

2017-09-21 Thread Pavel Stehule
2017-09-21 20:20 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.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

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

2017-09-21 Thread Peter Eisentraut
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

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

2017-09-21 Thread Pavel Stehule
2017-09-21 15:30 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 9/21/17 04:27, Pavel Stehule wrote: > > yes. It was designed for + commands only. Can be enhanced to all > > commands - then VERBOSE prefix should be removed - not sure if it is > > necessary. For me interesting

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

2017-09-21 Thread Peter Eisentraut
On 9/21/17 04:27, Pavel Stehule wrote: > yes. It was designed for + commands only. Can be enhanced to all > commands - then VERBOSE prefix should be removed - not sure if it is > necessary. For me interesting different order than default is only in > verbose mode. I see where you are coming from,

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

2017-09-21 Thread Pavel Stehule
2017-09-21 10:19 GMT+02:00 Alexander Korotkov : > On Thu, Sep 21, 2017 at 1:53 AM, Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote: > >> On 9/8/17 00:13, Pavel Stehule wrote: >> > I am sending rebased patch >> > >> > rebased again + fix obsolete help >>

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

2017-09-21 Thread Alexander Korotkov
On Thu, Sep 21, 2017 at 1:53 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 9/8/17 00:13, Pavel Stehule wrote: > > I am sending rebased patch > > > > rebased again + fix obsolete help > > Why are the variables called VERBOSE_SORT_* ? What is verbose about them? I

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

2017-09-21 Thread Alexander Korotkov
On Thu, Sep 21, 2017 at 1:52 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 9/19/17 12:54, Pavel Stehule wrote: > > However, patch misses regression tests covering added functionality. > > > > I am not sure if there are any tests related to output of \dt+ commands > > -

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

2017-09-20 Thread Peter Eisentraut
On 9/8/17 00:13, Pavel Stehule wrote: > I am sending rebased patch > > rebased again + fix obsolete help Why are the variables called VERBOSE_SORT_* ? What is verbose about them? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

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

2017-09-20 Thread Peter Eisentraut
On 9/19/17 12:54, Pavel Stehule wrote: > 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. How so? -- Peter Eisentraut

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

2017-09-19 Thread Alexander Korotkov
On Tue, Sep 19, 2017 at 7:54 PM, Pavel Stehule wrote: > 2017-09-19 16:14 GMT+02:00 Alexander Korotkov : > >> On Fri, Sep 8, 2017 at 7:13 AM, Pavel Stehule >> wrote: >> >>> 2017-08-16 14:06 GMT+02:00 Pavel Stehule

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

2017-09-19 Thread Pavel Stehule
Hi 2017-09-19 16:14 GMT+02:00 Alexander Korotkov : > On Fri, Sep 8, 2017 at 7:13 AM, Pavel Stehule > wrote: > >> 2017-08-16 14:06 GMT+02:00 Pavel Stehule : >> >>> Hi >>> >>> 2017-08-15 4:37 GMT+02:00 Peter Eisentraut <

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

2017-09-19 Thread Alexander Korotkov
On Fri, Sep 8, 2017 at 7:13 AM, Pavel Stehule wrote: > 2017-08-16 14:06 GMT+02:00 Pavel Stehule : > >> Hi >> >> 2017-08-15 4:37 GMT+02:00 Peter Eisentraut > com>: >> >>> On 3/11/17 07:06, Pavel Stehule wrote: >>> >

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

2017-09-07 Thread Pavel Stehule
2017-08-16 14:06 GMT+02:00 Pavel Stehule : > Hi > > 2017-08-15 4:37 GMT+02:00 Peter Eisentraut com>: > >> On 3/11/17 07:06, Pavel Stehule wrote: >> > I am sending a updated version with separated sort direction in special >> > variable >>

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

2017-08-16 Thread Pavel Stehule
Hi 2017-08-15 4:37 GMT+02:00 Peter Eisentraut : > 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 Regards Pavel

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

2017-08-14 Thread Peter Eisentraut
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. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --

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

2017-04-05 Thread Andres Freund
Hi, On 2017-03-11 13:06:13 +0100, Pavel Stehule wrote: > 2017-03-10 15:45 GMT+01:00 Alexander Korotkov : > > > On Fri, Mar 10, 2017 at 5:10 PM, Peter Eisentraut < > > peter.eisentr...@2ndquadrant.com> wrote: > > > >> On 2/24/17 16:32, Pavel Stehule wrote: > >> >

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

2017-03-30 Thread Pavel Stehule
> > This proposal was here already - maybe two years ago. The psql command parser doesn't allow any complex syntax - more - the more parameters in one psql commands is hard to remember, hard to read. >>> >>> Could you please provide a link to this discussion. Probably

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

2017-03-30 Thread Alexander Korotkov
On Tue, Mar 28, 2017 at 10:12 AM, Pavel Stehule wrote: > 2017-03-27 13:59 GMT+02:00 Alexander Korotkov : > >> On Fri, Mar 10, 2017 at 6:06 PM, Pavel Stehule >> wrote: >> >>> 2017-03-10 16:00 GMT+01:00 Alexander

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

2017-03-28 Thread Pavel Stehule
2017-03-27 13:59 GMT+02:00 Alexander Korotkov : > On Fri, Mar 10, 2017 at 6:06 PM, Pavel Stehule > wrote: > >> 2017-03-10 16:00 GMT+01:00 Alexander Korotkov >> : >> >>> On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost

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

2017-03-27 Thread Alexander Korotkov
On Fri, Mar 10, 2017 at 6:06 PM, Pavel Stehule wrote: > 2017-03-10 16:00 GMT+01:00 Alexander Korotkov : > >> On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost >> wrote: >> >>> * Peter Eisentraut

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

2017-03-11 Thread Pavel Stehule
2017-03-10 15:45 GMT+01:00 Alexander Korotkov : > On Fri, Mar 10, 2017 at 5:10 PM, Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote: > >> On 2/24/17 16:32, Pavel Stehule wrote: >> > set EXTENDED_DESCRIBE_SORT size_desc >> > \dt+ >> > \l+ >> >

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

2017-03-10 Thread Pavel Stehule
2017-03-10 16:05 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 3/10/17 09:57, Pavel Stehule wrote: > > PREFERRED_SORT_COLUMNS > > and PREFERRED_SORT_DIRECTION ? > > I think the name "preferred" implies that it will be ignored if it's not > found or something like that, but

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

2017-03-10 Thread Pavel Stehule
2017-03-10 16:00 GMT+01:00 Alexander Korotkov : > On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost wrote: > >> * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> > On 2/24/17 16:32, Pavel Stehule wrote: >> > > set

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

2017-03-10 Thread Peter Eisentraut
On 3/10/17 09:57, Pavel Stehule wrote: > PREFERRED_SORT_COLUMNS > and PREFERRED_SORT_DIRECTION ? I think the name "preferred" implies that it will be ignored if it's not found or something like that, but I don't think that's what you are implementing. -- Peter Eisentraut

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

2017-03-10 Thread Pavel Stehule
2017-03-10 15:16 GMT+01:00 Stephen Frost : > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > > On 2/24/17 16:32, Pavel Stehule wrote: > > > set EXTENDED_DESCRIBE_SORT size_desc > > > \dt+ > > > \l+ > > > \di+ > > > > > > Possible variants:

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

2017-03-10 Thread Alexander Korotkov
On Fri, Mar 10, 2017 at 5:16 PM, Stephen Frost wrote: > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > > On 2/24/17 16:32, Pavel Stehule wrote: > > > set EXTENDED_DESCRIBE_SORT size_desc > > > \dt+ > > > \l+ > > > \di+ > > > > > > Possible

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

2017-03-10 Thread Pavel Stehule
2017-03-10 15:10 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > 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

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

2017-03-10 Thread Alexander Korotkov
On Fri, Mar 10, 2017 at 5:10 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.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 >

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

2017-03-10 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.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,

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

2017-03-10 Thread Peter Eisentraut
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