pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John DeSoi <desoi@pgedit.com>
To: Raimon Fernandez <coder@montx.com>
Cc: pgsql-general List <pgsql-general@postgresql.org>
Subject: Re: Extended Query, flush or sync ?
Date: Sun, 20 Dec 2009 20:30:11 -0500
Message-ID: <03F6E9C9-59AF-4F9B-837A-822C224DCD22@pgedit.com> (raw)
In-Reply-To: <201B449B-118E-43A6-A413-4709A8FD463C@montx.com>
References: <92781008-8A70-42CE-A49B-6EE67103FACB@montx.com>
	<FC6CBC8C-A398-4835-B3A3-C16C6F4F62D9@pgedit.com>
	<E084987E-A212-4B70-8CFF-D83AA00629C5@montx.com>
	<C670629A-1E54-4F80-9497-6CCAC1A8BDC0@montx.com>
	<20091026231516.GN8812@alvh.no-ip.org>
	<4AE62E21.7040600@hogranch.com>
	<66F15D69-75E5-4D8E-84F8-2F21E09BBA98@pgedit.com>
	<9A9F2678-36B9-42A2-91B2-69076065E8EB@montx.com>
	<20091027134158.GB4876@alvh.no-ip.org>
	<4AB34FE9-CC23-48BE-B905-6478304E0E5B@montx.com>
	<20091027140657.GF4876@alvh.no-ip.org>
	<B7382F17-63B5-49D0-8E39-0F46F9243C95@montx.com>
	<B1EA5872-6E57-46A8-BF35-3192707A5C0F@montx.com>
	<A8F7FAA5-A817-4CCE-BA06-BF28B5534AC7@montx.com>
	<4B057205.6000203@gmail.com>
	<A86C9188-4DAC-4EC4-86BD-0B483287BC71@montx.com>
	<322BBEA5-A328-4197-971E-95359D8FD7F3@montx.com>
	<4B05A8D4.7020500@gmail.com>
	<6A231EA8-5255-47F3-BECB-9BFBD700044C@montx.com>
	<20879F35-6940-4272-988E-703E610C6212@montx.com>
	<57FE8BF9-5E03-4F5A-9BBA-A06118CC2E3B@pgedit.com>
	<0AADF4A5-E795-4F2D-AA2B-A4E1A4BD 9D93@montx.com>
	<AC4D2602-8300-41E5-BF48-67C39CD95BBF@montx.com>
	<FDA5304B-13B7-4A68-B04A-97049F6D99F5@pgedit.com>
	<A321ADD5-6C0F-46F5-87EA-EAEBA6420442@montx.com>
	<1224664A-9C2B-4CE2-888C-7F50F7556BBD@pgedit.com>
	<201B449B-118E-43A6-A413-4709A8FD463C@montx.com>

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 to the 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 my case.

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). In the second case it performs the parse first with the unnamed prepared statement (empty string) and then executes it. This is 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.







view thread (12+ messages)  latest in thread

Message-ID: <03F6E9C9-59AF-4F9B-837A-822C224DCD22@pgedit.com>
Permalink:  ../03F6E9C9-59AF-4F9B-837A-822C224DCD22@pgedit.com/
Also on:    postgresql.org/message-id/03F6E9C9-59AF-4F9B-837A-822C224DCD22@pgedit.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: desoi@pgedit.com, coder@montx.com, pgsql-general@postgresql.org
  Subject: Re: Extended Query, flush or sync ?
  In-Reply-To: <03F6E9C9-59AF-4F9B-837A-822C224DCD22@pgedit.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox