[postgis-devel] Inconsistencies in text output

rmrodriguez at carto.com rmrodriguez at carto.com
Mon Apr 13 03:05:52 PDT 2020


> - The current documentation and design intent is to provide the ability to specify Max DECIMAL Digits, so changing this would be a breaking change

It would be a breaking documentation change, but normally not a
behaviour breaking change. There are 100x more changes in behaviour
when complying with the documentation.

> - It is not useful to specify the Max TOTAL Digits, since without knowing the magnitude of the numbers this leads to unknown and possibly varying precision of output numbers

Well, we already have varying precision due to the use of floating
point. The nth decimal digit has more precision the closer to 0 you
are, so is and the higher the integer part, the less meaningful
decimal digits you have so it helps to remove digits that don't carry
information.

> +1 to correctly respecting the limit on Max DECIMAL Digits
> -2 to changing the semantics to Max TOTAL Digits

I'm fine going either way, I just want to make sure everyone
understands the decision before we commit to one. If I was starting
from scratch, I'd choose to return the shortest representation
maintaining round trip safety but that would be an even greater
breaking change.

I'm going to wait a few extra days to see if there are any more
comments before committing to a final solution.

-- 
Raúl Marín Rodríguez
carto.com


More information about the postgis-devel mailing list