SPI support needed for EXECUTE USING

Поиск
Список
Период
Сортировка
От Tom Lane
Тема SPI support needed for EXECUTE USING
Дата
Msg-id 18858.1206992610@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
The proposed EXECUTE USING patch represents a serious performance loss
compared to the traditional method of interpolating parameter values
into the query text, anytime the value of the parameter is important
for planning purposes.  We have fixed that in the Protocol BIND message
context by providing a way to push parameter values into the planning
process, but there is no way for plpgsql to do the same, because it
uses the SPI interface and SPI doesn't expose any way to do it.

I propose adding an additional SPI function along the lines of
int SPI_execute_with_args(const char *src,              int nargs, Oid *argtypes,              Datum *Values, const
char*Nulls,              bool read_only, long tcount);
 

to encapsulate the process of creating a one-shot plan and executing
it with specific parameter values.

Comments?
        regards, tom lane


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

Предыдущее
От: James Mansion
Дата:
Сообщение: Re: POSIX shared memory support
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] ANALYZE getting dead tuple count hopelessly wrong