Re: spurious function execution in prepared statements.

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: spurious function execution in prepared statements.
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A74DE@Herge.rcsinc.local
обсуждение исходный текст
Ответ на spurious function execution in prepared statements.  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Список pgsql-hackers
> Here's another workaround that may let you use a prepared statement:
>
> prepare ps(...) as
> select f(c) from (select c from t where [expr] limit 1) as t1
>
> -Mike

I was just exploring that.  In fact, the problem is not limited to
prepared statements...it's just that they are more likely to run a
seqscan so I noticed it there first.  Since I am in a situation where I
need very strict control over when and why f gets executed, I pretty
much have to go with the subquery option.

That said, it just seems that out of result set excecutions of f should
be in violation of something...

Merlin


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

Предыдущее
От: Michael Adler
Дата:
Сообщение: Re: spurious function execution in prepared statements.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: profile-guided opt. w/ GCC