Re: No class found for inet - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: No class found for inet
Date
Msg-id 40F154AA.8040800@opencloud.com
Whole thread Raw
In response to No class found for inet  ("Antony Paul" <antonypaul24@hotmail.com>)
List pgsql-jdbc
Antony Paul wrote:
> Hi all,
>     I am using Apache Commons BeanUtils RowSetDynaClass for disconnected
> resul tsets. But it gives error when I pass a ResultSet which contains an
> inet column type what to do with it.

What is the error?

> Why postgres is not providing classes
> for postgres specific data types ?.

Because noone has written support for them yet. java.net.InetAddress is
not a good data container for the inet type as it does not store netmask
information, so we'd need a postgresql-specific type.

It's pretty easy to write code to support new types -- take a look at
how the geometric types (org.postgresql.geometric.*) are supported. Once
written you can either register the class with the driver at runtime
(PGConnection.addDataType) or patch the driver to know about the new
class automatically.

> Using Postgres 7.3

What JDBC driver version?

-O

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Timestamp Question
Next
From: Oliver Jowett
Date:
Subject: Re: patch for getXXX methods