Thread: Thousands separator
Attached patch implements a setting for thousands separator in the query result grid (typically you'd use space or comma, but it supports whatever you can think of. Think of all the fun you can have by making it 0 or 3). It only does the query result window and not the edit grid, because this way we only have to insert it, and not try to parse it back (think about how much *less* fun it would be to parse that back if it was 0 or 3). I think that's perfectly ok - and it's still very useful in the query result. Comments? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Attachment
On Wed, Jun 27, 2012 at 6:43 PM, Magnus Hagander <magnus@hagander.net> wrote: > Attached patch implements a setting for thousands separator in the > query result grid (typically you'd use space or comma, but it supports > whatever you can think of. Think of all the fun you can have by making > it 0 or 3). > > It only does the query result window and not the edit grid, because > this way we only have to insert it, and not try to parse it back > (think about how much *less* fun it would be to parse that back if it > was 0 or 3). I think that's perfectly ok - and it's still very useful > in the query result. > > Comments? Can't we get the separator rules from the locale (and for that matter, the date format)? -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Wed, 2012-06-27 at 19:08 +0100, Dave Page wrote: > On Wed, Jun 27, 2012 at 6:43 PM, Magnus Hagander <magnus@hagander.net> wrote: > > Attached patch implements a setting for thousands separator in the > > query result grid (typically you'd use space or comma, but it supports > > whatever you can think of. Think of all the fun you can have by making > > it 0 or 3). > > > > It only does the query result window and not the edit grid, because > > this way we only have to insert it, and not try to parse it back > > (think about how much *less* fun it would be to parse that back if it > > was 0 or 3). I think that's perfectly ok - and it's still very useful > > in the query result. > > > > Comments? > > Can't we get the separator rules from the locale (and for that matter, > the date format)? > Or default to the locale and allow its change? -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com
On Wed, Jun 27, 2012 at 8:08 PM, Dave Page <dpage@pgadmin.org> wrote: > On Wed, Jun 27, 2012 at 6:43 PM, Magnus Hagander <magnus@hagander.net> wrote: >> Attached patch implements a setting for thousands separator in the >> query result grid (typically you'd use space or comma, but it supports >> whatever you can think of. Think of all the fun you can have by making >> it 0 or 3). >> >> It only does the query result window and not the edit grid, because >> this way we only have to insert it, and not try to parse it back >> (think about how much *less* fun it would be to parse that back if it >> was 0 or 3). I think that's perfectly ok - and it's still very useful >> in the query result. >> >> Comments? > > Can't we get the separator rules from the locale (and for that matter, > the date format)? We could, but you'd still want a setting to turn it on or off. And there's always going to be people who don't agree with their locale always (I know I'm one of them in many cases, though not specifically this one). Thus having it configurable is better, I think. We could make it default to whatever is in the locale if we want - but I think defaulting to none at all is actually a better choice, and it keeps it to "default is what we had before"... -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
On Wed, Jun 27, 2012 at 10:45 PM, Magnus Hagander <magnus@hagander.net> wrote: > On Wed, Jun 27, 2012 at 8:08 PM, Dave Page <dpage@pgadmin.org> wrote: >> On Wed, Jun 27, 2012 at 6:43 PM, Magnus Hagander <magnus@hagander.net> wrote: >>> Attached patch implements a setting for thousands separator in the >>> query result grid (typically you'd use space or comma, but it supports >>> whatever you can think of. Think of all the fun you can have by making >>> it 0 or 3). >>> >>> It only does the query result window and not the edit grid, because >>> this way we only have to insert it, and not try to parse it back >>> (think about how much *less* fun it would be to parse that back if it >>> was 0 or 3). I think that's perfectly ok - and it's still very useful >>> in the query result. >>> >>> Comments? >> >> Can't we get the separator rules from the locale (and for that matter, >> the date format)? > > We could, but you'd still want a setting to turn it on or off. And > there's always going to be people who don't agree with their locale > always (I know I'm one of them in many cases, though not specifically > this one). Thus having it configurable is better, I think. > > We could make it default to whatever is in the locale if we want - but > I think defaulting to none at all is actually a better choice, and it > keeps it to "default is what we had before"... I've now applied this to the newly stamped 1.17-master. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Magnus,
I have an admittedly late question \ comment on your thousands separator changes.
Can the separator, if we choose to use one, be displayed in the main pages for viewing things like table properties and column statistics?
Patrick
On Tue, Aug 14, 2012 at 3:50 PM, Patrick Greenwald <Patrick.Greenwald@novarad.net> wrote: > Magnus, > > > > I have an admittedly late question \ comment on your thousands separator > changes. > > > Can the separator, if we choose to use one, be displayed in the main pages > for viewing things like table properties and column statistics? Not at this point, no, but adding a similar feature for that would certainly be a welcome idea to me :) -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/