min_scale() 是一个系统函数,用于返回表示给定值所需的最小精度(小数位数)。
min_scale() 函数是在 PostgreSQL 13 中添加的。
示例
min_scale() 函数的执行示例
postgres=# SELECT min_scale(1.2300);
min_scale
-----------
2
(1 row)
postgres=# SELECT min_scale(1.23);
min_scale
-----------
2
(1 row)
postgres=# SELECT min_scale(1.0);
min_scale
-----------
0
(1 row)
postgres=# SELECT min_scale(1);
min_scale
-----------
0
(1 row)
参考资料
- PostgreSQL 文档: 数学函数
分类
另请参阅
反馈
请在此 提交关于“min_scale()”的任何评论、建议或更正。