Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix output precision limit for double values (issue #118) #119

Merged
merged 4 commits into from
Mar 26, 2024

Commits on Mar 14, 2024

  1. Fix output precision limit for double values (issue postgrespro#118)

    pgSphere used its own setting (set_sphere_output_precision function)
    to limit the output precision of double values, that could not be
    greater than 15 significant digits (DBL_DIG). It introduced some
    problems with dump/restore. PostgreSQL uses its own precision setting:
    extra_float_digits. The PostgreSQL setting allows to use more significant
    digits.
    
    This patch changes the default pgSphere output behaviour to utilize
    PostgreSQL extra_float_digits. Now, extra_float_digits is used by default,
    until set_sphere_output_precision is called.
    
    The old behaviour is kept for compatibility purposes. Once,
    set_sphere_output_precision is called, pgSphere starts to use the old
    behaviour (read, please, issue postgrespro#118 discussion).
    
    The patch introduces a new function - reset_sphere_output_precision.
    It is used to reset to the PostgreSQL behaviour after using
    set_sphere_output_precision.
    vitcpp committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    b7e12f3 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. Configuration menu
    Copy the full SHA
    c2116ae View commit details
    Browse the repository at this point in the history
  2. Add test for pgSphere output precision with different settings

    expected/output_precision.out   - PG 10-11
    expected/output_precision_1.out - PG 12+
    vitcpp committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    d9d5461 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. Configuration menu
    Copy the full SHA
    7b3b114 View commit details
    Browse the repository at this point in the history