Skip to content

Commit a109a0b

Browse files
committed
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
1 parent ef2d7c6 commit a109a0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/src/sgml/func.sgml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,10 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
15981598
<para>
15991599
<literal>round(42.4382, 2)</literal>
16001600
<returnvalue>42.44</returnvalue>
1601+
</para>
1602+
<para>
1603+
<literal>round(1234.56, -1)</literal>
1604+
<returnvalue>1230</returnvalue>
16011605
</para></entry>
16021606
</row>
16031607

0 commit comments

Comments
 (0)