Re: WITH HOLD and pooled connections - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WITH HOLD and pooled connections
Date
Msg-id 140.1060376013@sss.pgh.pa.us
Whole thread Raw
In response to WITH HOLD and pooled connections  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: WITH HOLD and pooled connections
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> 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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WITH HOLD and pooled connections
Next
From: Bruce Momjian
Date:
Subject: Re: Moved simple_prompt()/sprompt.c