Syntax
IS_IPV6(expr)
Purpose
Returns 1 if the expr argument is a valid IPv6 address string, otherwise returns 0. This function does not consider IPv4 addresses as valid IPv6 addresses.
For the specified argument, if IS_IPV6() returns 1, 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
