Re: BUG #11671: UNACCENT call with constant arg evaluated for each row

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: t(dot)chaumeny(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11671: UNACCENT call with constant arg evaluated for each row
Date: 2014-10-14 18:40:30
Message-ID: 11263.1413312030@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

t(dot)chaumeny(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas 2014-10-14 20:43:47 Re: BUG #11671: UNACCENT call with constant arg evaluated for each row
Previous Message t.chaumeny 2014-10-14 09:12:21 BUG #11671: UNACCENT call with constant arg evaluated for each row