Re: Issue with past commit: Allow fractional input values for integer GUCs ...

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Issue with past commit: Allow fractional input values for integer GUCs ...
Date: 2020-08-26 20:12:22
Message-ID: CA+Tgmobcd_56+aQ-A4OX-SaSqGoHMnxgFcNGed1-t29FWpnhtA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 24, 2020 at 5:32 AM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
> For example,
>
> log_file_mode = 384.234
> max_connections = 1.0067e2
> port = 5432.123
> CREATE TABLE ... WITH (fillfactor = 23.45);
> CREATE TABLE ... WITH (parallel_workers = 5.4);

I don't think any of these cases should be allowed. Surely if we
allowed 384.234 to be inserted into an integer column, everyone would
say that we'd lost our minds. These cases seem no different. The
discussion to which the commit links is mainly about allowing 0.2s to
work like 200ms, or something of that sort, when the value is
specified as a fraction but works out to an integer when converted to
the base unit. That is a completely different thing from letting
people configure 5.4 parallel workers.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-08-26 20:47:43 Re: Issue with past commit: Allow fractional input values for integer GUCs ...
Previous Message Alvaro Herrera 2020-08-26 19:15:51 Re: XMAX_LOCK_ONLY and XMAX_COMMITTED (fk/multixact code)