Re: WITH HOLD and pooled connections

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: WITH HOLD and pooled connections
Дата
Msg-id 200308082101.h78L1sK21611@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: WITH HOLD and pooled connections  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> 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.

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 pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: new psql \d command
Следующее
От: Bruno Wolff III
Дата:
Сообщение: contrib/vacuumlo problem in cvs