Ticket #407 (new enhancement)

Opened 3 years ago

Last modified 2 years ago

Use PgSQL globals to define number of output digits to print

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS Future
Component: postgis Version: trunk
Keywords: Cc:

Description

For WKT output and others (?) we can use the PgSQL DBL_DIG and the runtime extra_float_digits parameter to determine how much precision to output?

 http://www.postgresql.org/docs/current/static/runtime-config-client.html

Change History

Changed 3 years ago by colivier

Yes, sounds good to homogenize behaviour with other ST_As* functions. We could remove the precision parameter used for them.

Nota: current ST_As* use trim_trailing_zeros, and that's a good think to keep.

Changed 3 years ago by pramsey

As an aside, see #584 for a potential benefit of this feature. We should set extra_float_digits to -2 or -4 at the start of the regression run to try and squeeze out precision difference noise from the regression test runs.

We can't remove the precision parameter from the function signatures in liblwgeom, unfortunately, since we don't have access to the GUC at that level, only at the database level. If we were willing to put the output precision into a liblwgeom global we could, but then liblwgeom would not be thread-safe.

Do we care? maybe, if we plan on multi-threading it some day. On the other hand, the parser is currently not re-entrant, and I don't actually plan on making the new one re-entrant since it involves learning even more about bison and lex!

Changed 2 years ago by robe

  • milestone changed from PostGIS 2.0.0 to PostGIS Future

sounds too hard for the benefit

Note: See TracTickets for help on using tickets.