Re: inet datatype

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: inet datatype
Дата
Msg-id 20031204033934.GF5601@opencloud.com
обсуждение исходный текст
Ответ на Re: inet datatype  (Joseph Shraibman <jks@selectacast.net>)
Список pgsql-jdbc
On Wed, Dec 03, 2003 at 10:14:50PM -0500, Joseph Shraibman wrote:
> Oliver Jowett wrote:
> >On Wed, Dec 03, 2003 at 09:12:36PM -0500, Joseph Shraibman wrote:
> >
> >>Is there any reason in particular that the inet type isn't returned by
> >>the jdbc driver as an java.net.InetAddress ?
> >
> >
> >InetAddress doesn't store netmask information.
> >
> >-O
> ... and the alternative is... ?

Build an appropriate class that stores the whole type, along the lines of
what's done for the geometric types. That class can implement a
toInetAddress() method if needed.

> I say just return the InetAddress, and
> if someone wants the netmask they'll have to call getString() and parse
> it themselves.  Doing nothing is not an option.

I don't think doing a lossy conversion by default is a good solution.

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: inet datatype
Следующее
От: pginfo
Дата:
Сообщение: compiling pg 7.4 and jdbc