Re: v3 protocol question - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: v3 protocol question
Date
Msg-id 23491.1077229970@sss.pgh.pa.us
Whole thread Raw
In response to v3 protocol question  ("Chris Smith" <cdsmith@twu.net>)
List pgsql-jdbc
"Chris Smith" <cdsmith@twu.net> writes:
> I'm working on batch executes now, and ran into the following interpretation
> with the v3 protocol.  Does anyone know off-hand?  Can I issue a series of
> multiple Parse/Execute/Bind statements without an intervening Sync?

Yup, if you want the later ones to be dropped should an error occur in
the earlier ones.  The (nearly) entire point of Sync is to be the
protocol resynchronization point after an error.

You may or may not need to put in Flush messages instead.  If you want
to inspect any intermediate results before issuing more commands then
you will need to Flush before you block for input.

See also the recent discussion about the possibility of deadlock if you
send too much data without stopping to absorb any input data.  If you
can absorb data but leave it queued for later processing then this
shouldn't be too painful ...

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: ResultSetMetaData.isNullable(i) not working?
Next
From: "Marcus Andree S. Magalhaes"
Date:
Subject: urgent: autocommit & pg 7.4.1