Re: proposal: rounding up time value less than its unit. - Mailing list pgsql-hackers

From David Johnston
Subject Re: proposal: rounding up time value less than its unit.
Date
Msg-id CAKFQuwZmwHSF9_G1WM-LcDrmJroCx-EPSOe4ayzTG291L9tqNQ@mail.gmail.com
Whole thread Raw
In response to Re: proposal: rounding up time value less than its unit.  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: proposal: rounding up time value less than its unit.  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers


On Friday, September 26, 2014, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Tom Lane wrote:

> The impression I had was that Stephen was thinking of actually setting
> min_val to 1 (or whatever) and handling zero or -1 in some out-of-band
> fashion, perhaps by adding GUC flag bits showing those as allowable
> special cases.  I'm not sure how we would display such a state of affairs
> in pg_settings, but other than that it doesn't sound implausible.

I would think that if we're going to have "out of band" values, we
should just use "off", not 0 or -1.



Except "off" is not always semantically correct - some GUCs (not sure which ones ATM) use zero to mean 'default'.  I think -1 always means off.  Instead of 0 and -1 we'd need 'default' and 'off' with the ability to error if there is no meaningful default defined or if a feature cannot be turned off.

David J. 

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: proposal: rounding up time value less than its unit.
Next
From: Andrew Dunstan
Date:
Subject: Re: jsonb generator functions