Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > What would be interesting is a CREATE OR REPLACE functionality for
> > prepared cursors, where you could ask for it to be prepared, but if it
> > already existed, it would do nothing, or something like that.
> 
> I don't think you could call that CREATE OR REPLACE, because (if it's
> supposed to be efficient) it *wouldn't* replace.  In any case I think
> apps would prefer to avoid the overhead of even issuing such a command.
> If you approach it that way, you're adding some number of additional
> SQL commands to each pooled transaction, which seems to defeat the
> purpose of pre-preparing commands.

Of course, it wouldn't be called "CREATE OR REPLACE" but something like
that, or a flag to PREPARE.

I assume the prepare overhead is much higher than a single query parse.
How would you get the info without issuing a command to get it.  You
could get it via some protocol request, but that seems pretty hard to
manage from libpq up to your interface, and is the extra effort worth
avoiding sending a query?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to