Declaration
IS_IPV6(expr)
Description
If the expr parameter is a valid IPv6 address string, the function returns 1; otherwise, it returns 0. This function does not consider IPv4 addresses as valid IPv6 addresses.
For the specified parameter, if IS_IPV6() returns 1, then INET6_ATON() returns a non-NULL value.
Examples
obclient> SELECT IS_IPV6('10.x.x.x'), IS_IPV6('::1');
+---------------------+----------------+
| IS_IPV6('10.x.x.x') | IS_IPV6('::1') |
+---------------------+----------------+
| 0 | 1 |
+---------------------+----------------+
1 row in set