Re: proposal: rounding up time value less than its unit.

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: proposal: rounding up time value less than its unit.
Дата
Msg-id 20140926220226.GG5311@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: proposal: rounding up time value less than its unit.  (David Johnston <david.g.johnston@gmail.com>)
Ответы Re: proposal: rounding up time value less than its unit.  (David Johnston <david.g.johnston@gmail.com>)
Список pgsql-hackers
David Johnston wrote:
> 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.

Sure, "off" (and other spellings of boolean false value) and "default"
where they make sense, and whatever other values that make sense.  My
point is to avoid collapsing such logical values to integer/floating
point values just because the option uses a numeric scale.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Replication identifiers, take 3