I'd like to store ip2location database in a postgres database.
Guide on ip2location website suggests to store IP addresses that specify the range (ip_from
and ip_to
) in columns of type DECIMAL(39, 0)
.
I would have expected this to be of type INET
.
Is there any advantage (e.g. in terms of speed, size, ...) to use DECIMAL(39, 0)
instead of INET
? Other than the ip2location database format contains IPs converted to integers already and one would have to convert that back to IP addresses obviously.