Re: Issue with past commit: Allow fractional input values for integer GUCs ... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Issue with past commit: Allow fractional input values for integer GUCs ...
Date
Msg-id 2561826.1598278664@sss.pgh.pa.us
Whole thread Raw
In response to Issue with past commit: Allow fractional input values for integer GUCs ...  (Greg Nancarrow <gregn4422@gmail.com>)
Responses Re: Issue with past commit: Allow fractional input values for integer GUCs ...  (Greg Nancarrow <gregn4422@gmail.com>)
List pgsql-hackers
Greg Nancarrow <gregn4422@gmail.com> writes:
> The changes made allow fractional input for some cases where I believe
> it shouldn't be allowed (i.e. when the setting does not accept a
> unit).
> ...
> (Is it intentional - or indeed useful - to allow such settings, for
> integer options?)

Given that the commit included a test case exercising exactly that,
I'm not sure why you might think it was unintentional.  IIRC, the
reasoning was that we ought to hide whether any given GUC is int or
float underneath, in anticipation of future changes like caf626b2c.
Another argument is that in regular SQL, you can assign a fractional
value to an integer column and the system will let you do it; so
why not in SET?

In any case, we already shipped that behavior in v12, so I don't think
we can take it away now.  People don't appreciate formerly valid
settings suddenly not working any more.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Avoid displaying unnecessary "Recheck Cond" in EXPLAIN ANALYZE output if the bitmap is non-lossy
Next
From: Mark Dilger
Date:
Subject: Re: factorial function/phase out postfix operators?