Re: pg_size_pretty, SHOW, and spaces - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_size_pretty, SHOW, and spaces
Date
Msg-id f3e021d3-d843-04a5-d816-6921309b3bf1@2ndquadrant.com
Whole thread Raw
In response to pg_size_pretty, SHOW, and spaces  (Christoph Berg <myon@debian.org>)
Responses Re: pg_size_pretty, SHOW, and spaces  (Christoph Berg <myon@debian.org>)
List pgsql-hackers
On 8/1/16 7:35 AM, Christoph Berg wrote:
> PostgreSQL uses the spaces inconsistently, though. pg_size_pretty uses spaces:
> 
> # select pg_size_pretty((2^20)::bigint);
>  pg_size_pretty
> ────────────────
>  1024 kB

because it's "pretty" :)

> SHOW does not:
> 
> # show work_mem;
>  work_mem
> ──────────
>  1MB

The original idea might have been to allow that value to be passed back
into the settings system, without having to quote the space.  I'm not
sure, but I think changing that might cause some annoyance.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty()
Next
From: David Fetter
Date:
Subject: Re: New version numbering practices