Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group