Re: Prepared Statement Question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Prepared Statement Question
Дата
Msg-id 2677.1160410106@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Prepared Statement Question  ("Strong, David" <david.strong@unisys.com>)
Список pgsql-hackers
"Strong, David" <david.strong@unisys.com> writes:
> There is similar code for Parameter Lists (ParamListInfo) and Result Format Codes (rformats). Unless we're missing
something,a prepared statement would probably never change once prepared. 
 

I think you're missing something.  Or are you just proposing that we
could save one palloc per Bind operation?  Trust me, that ain't worth
worrying about.  In any case the number of parameters appearing in Bind
could be different from the number appearing in the statement --- the
fact that that's an error doesn't allow you to not process the message
before complaining.

> Along these lines, would it also be possible to keep an Executor State and Expression Context with the statement and
justreset key parts of them, rather than rebuilding them from scratch each time a prepared statement is executed?
 

Sounds highly bug-prone to me ... especially in the case where the
preceding execution didn't complete normally ...
        regards, tom lane


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Upgrading a database dump/restore
Следующее
От: "Strong, David"
Дата:
Сообщение: Re: Prepared Statement Question