Re: JDBC with PG 8.4 bytea character escaping wire protocol - Mailing list pgsql-jdbc

From David Wall
Subject Re: JDBC with PG 8.4 bytea character escaping wire protocol
Date
Msg-id 4AE0817A.5010502@computer.org
Whole thread Raw
In response to JDBC with PG 8.4 bytea character escaping wire protocol  (David Wall <d.wall@computer.org>)
Responses Re: JDBC with PG 8.4 bytea character escaping wire protocol  (Richard Broersma <richard.broersma@gmail.com>)
Re: JDBC with PG 8.4 bytea character escaping wire protocol  (dmp <danap@ttc-cmc.net>)
List pgsql-jdbc
> Does the JDBC 4 driver for PG 8.4 escape each character of the bytea
> type, or does it use a binary protocol?
>
> From another post, Merlin Moncure wrote, "libpq supports a binary
> protocol mode which allows you to execute queries sending bytea
> without escaping."  Is that true of the JDBC driver?  I'm concerned
> about the data size expansion that would result for the wire protocol
> when I use setBytes().

I tried downloading the JDBC source and must say it was complex enough
to a newbie that I couldn't really determine the answer myself.    Does
anybody know if the JDBC driver with PG 8.4 communicates using a binary
protocol for BYTEA transfers to/from or whether it sends escaped chars
only?  Or perhaps which classes handle the transfer of BYTEA to PG and
receives BYTEA responses from PG?

Thanks,
David

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: commit and rollback don't throw exceptions when they should
Next
From: Richard Broersma
Date:
Subject: Re: JDBC with PG 8.4 bytea character escaping wire protocol