Re: Extended Query, flush or sync ? - Mailing list pgsql-general

From John DeSoi
Subject Re: Extended Query, flush or sync ?
Date
Msg-id 03F6E9C9-59AF-4F9B-837A-822C224DCD22@pgedit.com
Whole thread Raw
In response to Implementing Frontend/Backend Protocol TCP/IP  (Raimon Fernandez <coder@montx.com>)
List pgsql-general
Hi Raimon,

On Dec 20, 2009, at 2:11 PM, Raimon Fernandez wrote:

>
> I'm not seeing my e-mails on the PostgreSQL General List ...
>
> ??????

Yes, my last message did not make it to the list yesterday (you obviously received it). I double checked and it was cc
tothe list. 


> I can pack all of them and send them at the same time, except de Parse, that will go at the connection beggining in
mycase. 

I have two routines, prepare and exec_prepare.

To prepare a named statement for multiple uses, I use prepare (parse, describe, sync).

exec_prepare can take a statement from prepare OR you can pass it the unparsed SQL instead (along with the parameters).
Inthe second case it performs the parse first with the unnamed prepared statement (empty string) and then executes it.
Thisis nice because if you don't need multiple executions, you can build and execute with a single network write and
read.You get the safety of parameterized execution and you don't have a prepared statement to dispose of in another
operation.


John DeSoi, Ph.D.





pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: PL/Perl Performance Problems
Next
From: Greg Smith
Date:
Subject: Re: Justifying a PG over MySQL approach to a project