Syntax
INET6_NTOA(expr)
Purpose
Converts an IPv6 or IPv4 network address in numeric form to a binary string that can be used as a string in the connection character set. If the parameter is not a valid address, it returns NULL.
INET6_NTOA() has the following characteristics:
It does not use system functions for conversion, so the output string is platform-independent.
The maximum length of the returned string is 39 (4 x 8 + 7).
The returned string uses lowercase letters for IPv6 addresses.
Examples
obclient> SELECT INET6_NTOA(INET6_ATON('fdfe::5a55:caff:fefa:9089'));
+------------------------------------------------------------+
| INET6_NTOA(INET6_ATON('fdfe::5a55:caff:fefa:9089')) |
+------------------------------------------------------------+
| fdfe::5a55:caff:fefa:9089 |
+------------------------------------------------------------+
1 row in set
