postgresql_16:4.5.1.1 Parameter Names and Values
PostgreSQL 16 > Server Administration > Server Configuration > Setting Parameters > Parameter Names and Values
All parameter names are case-insensitive. Every parameter takes a value of one of five types: boolean, string, integer, floating point, or enumerated (enum). The type determines the syntax for setting the parameter:
- *Boolean:* Values can be written as
on,off,true,false,yes,no,1,0(all case-insensitive) or any unambiguous prefix of one of these. - *String:* In general, enclose the value in single quotes, doubling any single quotes within the value. Quotes can usually be omitted if the value is a simple number or identifier, however. (Values that match an SQL keyword require quoting in some contexts.)
- *Numeric (integer and floating point):* Numeric parameters can be specified in the customary integer and floating-point formats; fractional values are rounded to the nearest integer if the parameter is of integer type. Integer parameters additionally accept hexadecimal input (beginning with
0x) and octal input (beginning with0), but these formats cannot have a fraction. Do not use thousands separators. Quotes are not required, except for hexadecimal input. - *Numeric with Unit:* Some numeric parameters have an implicit unit, because they describe quantities of memory or time. The unit might be bytes, kilobytes, blocks (typically eight kilobytes), milliseconds, seconds, or minutes. An unadorned numeric value for one of these settings will use the setting's default unit, which can be learned from
pg_settings.unit. For convenience, settings can be given with a unit specified explicitly, for example'120 ms'for a time value, and they will be converted to whatever the parameter's actual unit is. Note that the value must be written as a string (with quotes) to use this feature. The unit name is case-sensitive, and there can be whitespace between the numeric value and the unit. Valid memory units areB(bytes),kB(kilobytes),MB(megabytes),GB(gigabytes), andTB(terabytes). The multiplier for memory units is 1024, not 1000. Valid time units areus(microseconds),ms(milliseconds),s(seconds),min(minutes),h(hours), andd(days). If a fractional value is specified with a unit, it will be rounded to a multiple of the next smaller unit if there is one. For example,30.1 GBwill be converted to30822 MBnot32319628902 B. If the parameter is of integer type, a final rounding to integer occurs after any unit conversion. - *Enumerated:* Enumerated-type parameters are written in the same way as string parameters, but are restricted to have one of a limited set of values. The values allowable for such a parameter can be found from
pg_settings.enumvals. Enum parameter values are case-insensitive.