Syntax
IS_IPV6(expr)
Purpose
It returns 1 if the expr argument is a string indicating a valid IPv6 address, and returns 0 if otherwise. It does not consider an IPv4 address as a valid IPv6 address.
For a specified argument, if the IS_IPV6() function returns 1, the INET6_ATON() function returns a non-NULL value.
Examples
obclient> SELECT IS_IPV6('10.0.5.9'), IS_IPV6('::1');
+---------------------+----------------+
| IS_IPV6('10.0.5.9') | IS_IPV6('::1') |
+---------------------+----------------+
| 0 | 1 |
+---------------------+----------------+
1 row in set