]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Doc: adjust examples of EXTRACT() output to match current reality.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Apr 2023 17:09:18 +0000 (13:09 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 10 Apr 2023 17:09:18 +0000 (13:09 -0400)
commit707691ea620eaa7d8c7fc1e5177a54e944f39b59
tree280e57b042c33f0d2cad7d485501763ac697a2d0
parentced712f1a1d60d5e24d207d97efbc4dddc051079
Doc: adjust examples of EXTRACT() output to match current reality.

EXTRACT(EPOCH), EXTRACT(SECOND), and some related cases print more
trailing zeroes than they used to.  This behavior change happened
with commit a2da77cdb (Change return type of EXTRACT to numeric),
and it was intentional according to the commit log:

    - Return values when extracting fields with possibly fractional
      values, such as second and epoch, now have the full scale that the
      value has internally (so, for example, '1.000000' instead of just
      '1').

It's been like that for two releases now, so while I suggested
changing this back, it's probably better to adjust the documentation
examples.

Per bug #17866 from Евгений Жужнев.  Back-patch to v14 where the
change came in.

Discussion: https://postgr.es/m/17866-18eb70095b1594e2@postgresql.org
doc/src/sgml/func.sgml