is_float 函数
检查值是否为浮点数。对于浮点数(float4 和 float8),is_float 函数返回 true。对于任何其他值,该函数返回 false。
is_decimal 集和 is_float 集是不相交的。
语法
is_float (super_expression)
Arguments
- super_expression
-
SUPER 表达式或列。
返回值
布尔值
示例
以下查询显示了 is_float 函数。
CREATE TABLE t(s super); INSERT INTO t VALUES(2.22::FLOAT); SELECT s, is_float(s) FROM t; s | is_float ---------+---------- 2.22e+0 | True (1 row)