Re: Calculated view fields (8.1 != 8.2)
| От | Tom Lane |
|---|---|
| Тема | Re: Calculated view fields (8.1 != 8.2) |
| Дата | |
| Msg-id | 6320.1173203258@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Calculated view fields (8.1 != 8.2) (Gaetano Mendola <mendola@bigfoot.com>) |
| Ответы |
Re: Calculated view fields (8.1 != 8.2)
|
| Список | pgsql-hackers |
Gaetano Mendola <mendola@bigfoot.com> writes:
> [ 8.2 evaluates volatile functions in the targetlist of a view ]
> If I mark the function as STABLE or IMMUTABLE then even with version
> 8.2 the function is not evaluated. Is this the intended behavior?
Yes; people complained that we needed to be more careful about the
number of times volatile functions get evaluated.
> I didn't see something about it in the release note.
<listitem> <para> Do not flatten subqueries that contain <literal>volatile</> functions in their
targetlists (Jaime Casanova) </para>
<para> This prevents surprising behavior due to multiple evaluation of a <literal>volatile</>
function(such as <function>random()</> or <function>nextval()</>). It might cause performance degradation
inthe presence of functions that are unnecessarily marked as <literal>volatile</>. </para> </listitem>
regards, tom lane
В списке pgsql-hackers по дате отправления: