Re: help: fastpath error!

From: Barry Lind <barry(at)xythos(dot)com>
To: mdt(at)emdete(dot)de
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: help: fastpath error!
Date: 2002-05-06 16:21:49
Message-ID: 3CD6AD9D.7000402@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Michael,

What version of postgres and what version of the jdbc drivers are you using?

Also, more info would be helpful. When you say 'doesn't work' that
doesn't give us a lot to go on. Error messages and any output you are
getting would help a lot.

thanks,
--Barry

M. Dietrich wrote:
> hi everyone!
>
> i get still those fastpath errors with the jdbc drivers. i tested the
> driver installed with debian, the stable and the development driver
> from jdbc.postgresql.org. has anybody else the same problem?
>
> i use blobs alot. using blobs with pg-sql's jdbc does not work
> strait-forward in a jdbc-manner like this:
>
> statement.setBinaryStream(4, in, size);
>
> even this does not work:
>
> byte buffer[] = new byte[(int)size];
> in.read(buffer);
> statement.setBytes(4, buffer);
>
>
> so this one is what i found out works best for me:
>
> org.postgresql.largeobject.LargeObjectManager lom = ((org.postgresql.Connection)getConnection()).getLargeObjectAPI();
> int loid = lom.create();
> org.postgresql.largeobject.LargeObject blob = lom.open(loid);
> int s;
> byte buf[] = new byte[2048];
> while ((s = in.read(buf, 0, buf.length)) > 0)
> blob.write(buf, 0, s);
> blob.close();
> java.sql.Blob b = new org.postgresql.largeobject.PGblob((org.postgresql.Connection)getConnection(), loid);
> statement.setBlob(4, b);
>
> but using this i get the fast-path error. using the other versions
> results in a errormessage containing all the binary data.
>
> best regards,
>
> michael
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeff Bartels 2002-05-06 19:07:38 Looking for PostGres jdbc bindings
Previous Message Thomas O'Dowd 2002-05-06 15:01:12 Re: JDBC Driver JAR Files