Arguile <arguile@lucentstudios.com> writes:
> On Tue, 2003-09-30 at 07:06, Mike Mascari wrote:
>> SELECT lower(name)
>> FROM employees
>> WHERE lower(name) = 'mike'
>>
>> will PostgreSQL re-evaluate lower(name)? Is it necessary?
> No, it won't re-evaluate.
I think he's asking whether the lower(name) appearing in the output list
will be separately evaluated. Which it will be. There's not presently
any code that looks for common subexpressions.
regards, tom lane