Wiki / Configuration Parameters
extra_float_digits
This parameter adjusts the number of digits used for textual output of floating-point values, including float4, float8, and geometric data types. If the value is 1 (the default) or above, float values are output in shortest-precise format; see Section 8.1.3. The actual number of digits generated depends only on the value being output, not on the value of this parameter. At most 17 digits are required for float8 values, and 9 for float4 values. This format is both fast and precise, preserving the original binary float value exactly when correctly read. For historical compatibility, values up to 3 are permitted. If the value is zero or negative, then the output is rounded to a given decimal precision. The precision used is the standard number of digits for the type (FLT_DIG or DBL_DIG as appropriate) reduced according to the value of this parameter. (For example, specifying -1 will cause float4 values to be output rounded to 5 significant digits, and float8 values rounded to 14 digits.) This format is slower and does not preserve all the bits of the binary float value, but may be more human-readable. Note The meaning of this parameter, and its default value, changed in PostgreSQL 12; see Section 8.1.3 for further discussion.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- boot val
- 1
- category
- Client Connection Defaults / Locale and Formatting
- context
- user
- documented
- true
- enumvals
- Unknown
- extra desc
- This affects real, double precision, and geometric data types. A zero or negative parameter value is added to the standard number of digits (FLT_DIG or DBL_DIG as appropriate). Any value greater than zero selects precise output mode.
- lang
- en
- max val
- 3
- metadata version
- 18
- min val
- -15
- name
- extra_float_digits
- short desc
- Sets the number of digits displayed for floating-point values.
- source
- pg-settings-source-snapshot
- unit
- Unknown
- vartype
- integer
Definition PG 18
This parameter adjusts the number of digits used for textual output of floating-point values, including float4, float8, and geometric data types. If the value is 1 (the default) or above, float values are output in shortest-precise format; see Section 8.1.3. The actual number of digits generated depends only on the value being output, not on the value of this parameter. At most 17 digits are required for float8 values, and 9 for float4 values. This format is both fast and precise, preserving the original binary float value exactly when correctly read. For historical compatibility, values up to 3 are permitted. If the value is zero or negative, then the output is rounded to a given decimal precision. The precision used is the standard number of digits for the type (FLT_DIG or DBL_DIG as appropriate) reduced according to the value of this parameter. (For example, specifying -1 will cause float4 values to be output rounded to 5 significant digits, and float8 values rounded to 14 digits.) This format is slower and does not preserve all the bits of the binary float value, but may be more human-readable. Note The meaning of this parameter, and its default value, changed in PostgreSQL 12; see Section 8.1.3 for further discussion.
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:897ec286b4d9322e07c31d920c1569979144a0b575852369ee82dddf7b8a05dc
Text language: en · wiki-repair-20261023:897ec286b4d9322e07c31d920c1569979144a0b575852369ee82dddf7b8a05dc