[postgis-users] JDBC 1.0.0: How to setNull() in a PreparedStatement?

Markus Schaber schabi at logix-tt.com
Thu Mar 3 02:56:02 PST 2005


Hi, Jean-Pierre,

Jean-Pierre Quirion schrieb:

> JDBC: pg80b1.308.jdbc3.jar and the new postgis.jar for
> Postgis 1.0.0 (2005/02/24)
> 
> I am using Prepared Statements for insert/update in
> JDBC and I don't find a proper way how to insert a
> NULL value in the geom column.

This are some known issues using the new type-checking with the
server-side prepared statements for pgjdbc8.0. As far as I remember from
the pgjdbc mailing list, those should be fixed using the new build 310
of pgjdbc (postgresql-8.0-310.jdbc3.jar).

Note that this does not only affect PostGIS, but all the other
setObject() users, too. I still do not fully know all the details and
implications of this changes.

If build 310 does not work for you, you could temporarily use the latest
pgjdbc-7.4 jar, which should work fine against an 8.0 server. This
should you allow you to continue your work, while we in parallel try to
resolve your issues here and on pgsql-jdbc at postgresql.org.

Maybe I should add some regression tests for this cases?

> PS: Thanks to Markus Schraber, JDBC with PostGis is a
> lot easier than ever!

Thanks. :-)

Markus

-- 
Markus Schaber | Dipl. Informatiker | Software Development GIS

Fight against software patents in EU! http://ffii.org/
                                      http://nosoftwarepatents.org/



More information about the postgis-users mailing list