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