Tags: postgrespro/pgsphere
Tags
Fix output precision limit for double values (issue #118) (#119) Fix output precision limit for double values (issue #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 #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. * Update upgrade script (reset_sphere_output_precision function) * Add test for pgSphere output precision with different settings expected/output_precision.out - PG 10-11 expected/output_precision_1.out - PG 12+ * Add extra_float_digits = 2 for epochprop and bounding_box_gist tests
PreviousNext