summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2022-12-01 17:26:12 +0000
committerTom Lane2022-12-01 17:26:12 +0000
commita475157e6bf0c0f509cc9fb6ccff2b3876eb5f4b (patch)
tree431c736ddaae936d7edd4ae81321b462637eb3de
parent312061cbc76e1a1f3244f89697c4078bc3e8523c (diff)
Doc: add example of round(v, s) with negative s.
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
-rw-r--r--doc/src/sgml/func.sgml4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index f0155eef7f5..8f9035f008b 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1647,6 +1647,10 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
<para>
<literal>round(42.4382, 2)</literal>
<returnvalue>42.44</returnvalue>
+ </para>
+ <para>
+ <literal>round(1234.56, -1)</literal>
+ <returnvalue>1230</returnvalue>
</para></entry>
</row>