pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Include GUC's unit, if it has one, in out-of-range error message
2+ messages / 2 participants
[nested] [flat]

* pgsql: Include GUC's unit, if it has one, in out-of-range error message
@ 2019-03-10 19:18  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Tom Lane @ 2019-03-10 19:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Include GUC's unit, if it has one, in out-of-range error messages.

This should reduce confusion in cases where we've applied a units
conversion, so that the number being reported (and the quoted range
limits) are in some other units than what the user gave in the
setting we're rejecting.

Some of the changes here assume that float GUCs can have units,
which isn't true just yet, but will be shortly.

Discussion: https://postgr.es/m/3811.1552169665@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/28a65fc3607a0f45c39a9418f747459bb4f1592a

Modified Files
--------------
src/backend/utils/misc/guc.c      | 113 ++++++++++++++++++++++----------------
src/test/regress/expected/guc.out |   2 +-
2 files changed, 66 insertions(+), 49 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Include GUC's unit, if it has one, in out-of-range error message
@ 2019-03-11 01:11  Michael Paquier <michael@paquier.xyz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2019-03-11 01:11 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org

On Sun, Mar 10, 2019 at 07:18:20PM +0000, Tom Lane wrote:
> Include GUC's unit, if it has one, in out-of-range error messages.
> 
> This should reduce confusion in cases where we've applied a units
> conversion, so that the number being reported (and the quoted range
> limits) are in some other units than what the user gave in the
> setting we're rejecting.
> 
> Some of the changes here assume that float GUCs can have units,
> which isn't true just yet, but will be shortly.

It does not seem to have cooled down all animals yet, whelk is
still complaining:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=whelk&dt=2019-03-11%2000%3A41%3A13

-ERROR:  -Infinity is outside the valid range for parameter "geqo_selection_bias" (1.5 .. 2)
+ERROR:  invalid value for parameter "geqo_selection_bias": "-infinity"

It would be nice if we could avoid an alternate output.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../20190311011114.GD1818@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-03-11 01:11 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-03-10 19:18 pgsql: Include GUC's unit, if it has one, in out-of-range error message Tom Lane <tgl@sss.pgh.pa.us>
2019-03-11 01:11 ` Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox