pgsql: Include GUC's unit, if it has one, in out-of-range error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Include GUC's unit, if it has one, in out-of-range error message
Date: 2019-03-10 19:18:20
Message-ID: E1h33xk-0001Og-Gs@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-03-10 22:46:23 pgsql: Fix documentation on partitioning vs. foreign tables
Previous Message Tom Lane 2019-03-10 16:59:39 pgsql: Disallow NaN as a value for floating-point GUCs.

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2019-03-10 19:53:33 Re: Making all nbtree entries unique by having heap TIDs participate in comparisons
Previous Message David Fetter 2019-03-10 18:58:07 Re: Batch insert in CTAS/MatView code