Re: v3 protocol question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Chris Smith" <cdsmith(at)twu(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: v3 protocol question
Date: 2004-02-19 22:32:50
Message-ID: 23491.1077229970@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Chris Smith" <cdsmith(at)twu(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Marcus Andree S. Magalhaes 2004-02-20 02:32:40 urgent: autocommit & pg 7.4.1
Previous Message Kris Jurka 2004-02-19 22:16:20 Re: ResultSetMetaData.isNullable(i) not working?