How can multiple SQL statements be included in one prepare command? The goal is to reduce chatter between the client and server by submitting an atomic tranasaction set. My interface is libpq.  






How can multiple SQL statements be included in 
one prepare command? The goal is to reduce chatter between the client and 
server by submitting an atomic tranasaction set. My interface is 
libpq.
Thu, 15 Apr 2004 09:26:24 -0400
"Robert Turnbull" <rturnbull@strategicmind.com>
Multiple statements in one prepare
"Robert Turnbull" <rturnbull@strategicmind.com> writes:
> How can multiple SQL statements be included in one prepare command?

They can't.  Consider using a plpgsql function, instead.

			regards, tom lane

Tue, 20 Apr 2004 18:03:17 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Multiple statements in one prepare 
On 15-Apr-04, at 9:26 AM, Robert Turnbull wrote:
> How can multiple SQL statements be included in one prepare command? 
> The goal is to reduce chatter between the client and server by 
> submitting an atomic tranasaction set.

You can submit multiple PREPARE commands in one query string (separated 
by semi-colons), so the difference in FE/BE traffic should be 
negligible.

-Neil


Sun, 25 Apr 2004 01:06:49 -0400
Neil Conway <neilc@samurai.com>
Re: Multiple statements in one prepare