Re: BUG #11671: UNACCENT call with constant arg evaluated for each row - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #11671: UNACCENT call with constant arg evaluated for each row
Date
Msg-id 11263.1413312030@sss.pgh.pa.us
Whole thread Raw
In response to BUG #11671: UNACCENT call with constant arg evaluated for each row  (t.chaumeny@gmail.com)
Responses Re: BUG #11671: UNACCENT call with constant arg evaluated for each row  (Thomas <t.chaumeny@gmail.com>)
Re: BUG #11671: UNACCENT call with constant arg evaluated for each row  (David G Johnston <david.g.johnston@gmail.com>)
List pgsql-bugs
t.chaumeny@gmail.com writes:
> Since UNACCENT function is defined as STABLE, I would expect its result to
> be evaluated only once in the second query.

The system does not promise any such thing for stable functions.
STABLE is a marker that it is *safe* to evaluate the function fewer
times than naive SQL semantics would suggest; it is not a requirement.

            regards, tom lane

pgsql-bugs by date:

Previous
From: t.chaumeny@gmail.com
Date:
Subject: BUG #11671: UNACCENT call with constant arg evaluated for each row
Next
From: Thomas
Date:
Subject: Re: BUG #11671: UNACCENT call with constant arg evaluated for each row