invalid value for parameter “…”: “…”
SQLSTATE 22023 condition invalid_parameter_value class 22 — Data Exception severity ERROR
Reproduced & verified on PostgreSQL 14.23, 15.18, 16.14, 17.10 and 18.4 — identical message on every version.
Last reviewed 30 May 2025 · Reproduced live with the SQL on this page.
Symptoms
A configuration parameter was given a value outside its allowed set/range. PostgreSQL raises SQLSTATE 22023 (invalid_parameter_value).
- The value is the wrong type or out of range for the parameter.
- A DETAIL/HINT often lists acceptable values.
- Common with enum-style or bounded numeric parameters.
What the server log shows
ERROR: invalid value for parameter "log_min_messages": "verbose"
Why PostgreSQL raises this — what the manual says
Section 19.1.1 Parameter Names and Values:
“Enumerated-type parameters are written in the same way as string parameters, but are restricted to have one of a limited set of values.”
Each GUC has a defined type and valid domain. A value that doesn’t parse or falls outside the allowed set/range is rejected with 22023.
Common causes
- An out-of-range numeric value.
- An enum parameter set to an undefined option.
- A unit/format the parameter does not accept.
How to fix it
- Set a value within the parameter’s allowed range/options.
- Check valid values:
SELECT enumvals FROM pg_settings WHERE name='log_min_messages';. - Include correct units (e.g.
'256MB') for memory parameters.
Related & next steps
Reference: PostgreSQL 18 Section 20.1 “Setting Parameters”.