Doc: add example of round(v, s) with negative s.
authorTom Lane
Thu, 1 Dec 2022 17:26:12 +0000 (12:26 -0500)
committerTom Lane
Thu, 1 Dec 2022 17:26:12 +0000 (12:26 -0500)
This has always worked, but you'd be unlikely to guess it
from the documentation.  Add an example showing it.

Lack of docs noted by David Johnston.  Back-patch to v13;
the documentation layout we used before that was not very
amenable to squeezing in multiple examples.

Discussion: https://postgr.es/m/CAKFQuwZ4Vy1Xty0G5Ok+ot=NDrU3C6hzF1JwUk-FEkwe3V9_RA@mail.gmail.com

doc/src/sgml/func.sgml

index f0155eef7f531fa7a1edee96aed7c3c8a38c4d7f..8f9035f008bde6aa26a59b86e7e34f2d2a432917 100644 (file)
@@ -1647,6 +1647,10 @@ repeat('Pg', 4) PgPgPgPg
        
         round(42.4382, 2)
         42.44
+       
+       
+        round(1234.56, -1)
+        1230