How can we convert BYTEA datatypes to an IP address in INET or TEXT/VARCHAR in Postgres?
Tried all the ENCODE(), DECODE() with 'hex', 'base64' combinations with no luck.
For context, in MySQL, we can use INET6_NTOA('some hex') to get an IP address.
I'm aware there's an INET type in Postgres, but I'm okay with either casting the result to INET type or TEXT/VARCHAR type, as long as it shows (both IPv4 and IPv6)