On 25th of January 2020, Dean Rasheed committed patch:
Add functions gcd() and lcm() for integer and numeric types. These compute the greatest common divisor and least common multiple of a pair of numbers using the Euclidean algorithm. Vik Fearing, reviewed by Fabien Coelho. Discussion: https://email@example.com
Description is pretty clear, but let's see it in action.
=$ select gcd(292215::numeric, 423430::numeric), lcm(292215::numeric, 423430::numeric); gcd | lcm -----+----------- 805 | 153705090 (1 row) Time: 1.243 ms
Looks reasonable. It's not a very common use case, but it definitely can be useful, so thanks to all involved.