On Sat, 24 Apr 2004, Moray Taylor wrote:
>
> On 23 Apr 2004, at 01:29, Oliver Jowett wrote:
>
> > Moray Taylor wrote:
> >> Hi,
> >> I'm having some trouble updating CIDR types using jdbc, I use
> >> updateObject() to change it, which goes OK, but when I do an
> >> updateRow(), I get this error
> >> java.sql.SQLException: ERROR: invalid cidr value: "1.1.1.1/4"
> >> at
> >> org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateRow(AbstractJdbc2Res
> >> ul tSet.java:1117)
> >
Well this first error is backend error with detail of "Value has bits set
to right of mask." Using a valid cidr value such as 192.168.1.0/24
produces the driver error I imagine you are complaining about.
> I was using updateObject(), I changed it to updateString, I still get
> an SQLException, with no getMessage() data, however, the data IS
> entered into the database, but the ResultSet isn't updated, i.e. I have
> to requery to see the results. Any ideas?
>
I have applied the attached patch to fix this to the cvs and stable
branches. Binary versions are available here:
http://www.ejurka.com/pgsql/jars/
Kris Jurka