Syntax
IS_IPV6(expr)
Purpose
IS_IPV6() 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.x.x.x'), IS_IPV6('::1');
+---------------------+----------------+
| IS_IPV6('10.x.x.x') | IS_IPV6('::1') |
+---------------------+----------------+
| 0 | 1 |
+---------------------+----------------+
1 row in set