Re: Binary Cursors (& Geometric Type Support)

From: Barry Lind <barry(at)xythos(dot)com>
To: Jeff Hoffmann <jeff(at)propertykey(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Binary Cursors (& Geometric Type Support)
Date: 2002-09-22 15:58:25
Message-ID: 3D8DE8A1.60307@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Jeff,

Since the curror is returning binary data, the only method that works re
retrieve the data is getBytes(). Get Object will not work with binary
cursors.

--Barry

Jeff Hoffmann wrote:
> 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(at)A?z?v A?OT&?A(at)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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeff Hoffmann 2002-09-22 22:22:05 Re: Binary Cursors (& Geometric Type Support)
Previous Message Jeff Hoffmann 2002-09-21 03:39:29 Binary Cursors (& Geometric Type Support)