Re: GUC with units, details - Mailing list pgsql-hackers

From Tom Lane
Subject Re: GUC with units, details
Date
Msg-id 1306.1153921448@sss.pgh.pa.us
Whole thread Raw
In response to Re: GUC with units, details  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane wrote:
>> That seems OK for SHOW, which is mainly intended for human
>> consumption, but what will you do with pg_settings?  For programmatic
>> use I think we want more predictable behavior.

> I'd think that a program would not care.  Or do you want a units-free 
> display that can be parsed as integer?

Yeah.  If the value might be shown as either "99kB" or "9MB" then a
program *must* have a pretty complete understanding of the units system
to make sense of it at all.  Furthermore this is not backwards
compatible --- it'll break any existing code that inspects pg_settings
values.  I suggest that the values column should continue to display
exactly as it does today (ie, the integer value in the var's native
units) and we just add a column saying what the native units are.

> Do we want to introduce a difference between pg_settings and SHOW ALL?  

Yup, I think that's the lesser of the evils.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jonah H. Harris"
Date:
Subject: Re: INSERT ... RETURNING in 8.2
Next
From: Tom Lane
Date:
Subject: Re: Resurrecting per-page cleaner for btree