Binary Cursors (& Geometric Type Support)
| От | Jeff Hoffmann |
|---|---|
| Тема | Binary Cursors (& Geometric Type Support) |
| Дата | |
| Msg-id | 3D8BE9F1.3010905@propertykey.com обсуждение исходный текст |
| Список | pgsql-jdbc |
I'm trying to port some code from C/libpq to Java & one of the things
I'm having trouble with is getting binary cursors to work. The C code
uses a binary cursor to speed up a loop through a bunch of polygons & I
was hoping it would have the same effect with Java. The code for a
non-binary cursor works fine, but is just taking too long. Basically,
here's what I'm doing:
query.executeUpdate("declare my_cursor cursor for select p from
my_polygon");
ResultSet rs = query.executeQuery("fetch 1 from my_cursor");
PGpolygon p = (PGpolygon)rs.getObject("p");
When I switch the "cursor" to a "binary cursor", I get the following error:
Conversion of point failed - java.lang.NumberFormatException:
??n?gk@A?z?v A?OT&?A@A
Is there something else I have to do to get this to work or am I going
to be out of luck? I've seen references to people successfully using
binaries cursors in earlier messages in the list -- is it just the
non-standard geometric types that are troublesome from a binary perspective?
Thanks,
Jeff Hoffmann
PropertyKey.com
В списке pgsql-jdbc по дате отправления: