Hello, and I am sorry for the delay.

Thanks for the additional insight in Postgres' understanding of network
address types. I'll consider these things when implementing #2092:
https://github.com/jOOQ/jOOQ/issues/2092

Unfortunately, I can't promise that this be a high priority, though.

Cheers
Lukas

2013/1/4 Peter Ertl <[email protected]>

> just for the records...
>
> there is not only INET but also CIDR and MACADDR for network stuff in
> postgresql:
> http://www.postgresql.org/docs/9.2/static/datatype-net-types.html
>
> the data type supports quite a number of operations (one reason for using
> these types) so having a dedicated data type might be necessary to support
> these properly in jOOQ:
> http://www.postgresql.org/docs/9.2/static/functions-net.html
>
> using getByAddress() should indeed be safe
>
> Am Freitag, 4. Januar 2013 23:30:25 UTC+1 schrieb Lukas Eder:
>
>>
>> Thanks for the hint ... works nicely :-)
>>>
>>
>> Good to know
>>
>>
>>> Maybe you should use VARCHAR as the SQL data type and convert the value
>>> using CAST(? as inet) and CAST(? as text) when sending / receiving an inet
>>> address from the database.
>>>
>>
>> I think I've seen other databases supporting similar types. It may make
>> sense to introduce a more formal type support.
>> Note that jOOQ needs the extra type information to be able to know when
>> to cast. With VARCHAR / String, that is not possible. Also, converters
>> won't help in this case.
>>
>>
>>> InetAddress makes sense for mapping into java world, alternatively
>>> java.lang.String could make sense, too
>>>
>>
>> See above, a distinct DataType / Class is needed to know how to properly
>> cast it.
>>
>>
>>> Be aware that InetAddress might cause unwanted DNS lookups (eventually
>>> depending on OS) when instantiating the object.
>>>
>>
>> I was thinking about using this method here:
>> http://docs.oracle.com/javase/**6/docs/api/java/net/**
>> InetAddress.html#getByAddress(**byte[])<http://docs.oracle.com/javase/6/docs/api/java/net/InetAddress.html#getByAddress(byte[])>
>>
>> According to the Javadocs, the method doesn't perform any lookups and
>> doesn't block...
>> Another option is to introduce a minimal INET implementation in
>> org.jooq.types, similar to unsigned integers and interval data types.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to