Let's assume I have a table like so:
CREATE TABLE employees (
employeeid text not null,
name text not null
);
CREATE INDEX i_employees ON employees(lower(name));
Let's also assume that the lower() function is computationally
expensive. Now if I have a query like:
SELECT lower(name)
FROM employees
WHERE lower(name) = 'mike'
will PostgreSQL re-evaluate lower(name)? Is it necessary?
Mike Mascari
mascarm(at)mascari(dot)com