Need to confirm, if the below is approximately correct:
-- Reading ResultSet (just treat as a string)
String ipStr = resultSet.getString(x);
if (ipStr == null) {
return null;
} else {
return InetAddress.getByName(ipStr);
}
-- Binding PreparedStatement, use PGobject
PGobject pgObj = new PGobject();
pgObj.setType("inet");
pgObj.setValue(inetAddressValue.getHostAddress());
preparedStatement.setObject(index, pgObj);
Given the above is the way to go ... we'd then likely create a ScalarTypeInetAddressPostgres to do that (so not just a DDL change).