help: fastpath error!
От | M. Dietrich |
---|---|
Тема | help: fastpath error! |
Дата | |
Msg-id | 20020506134350.GE3762@emdete.de обсуждение исходный текст |
Список | pgsql-jdbc |
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
В списке pgsql-jdbc по дате отправления: