I'm probably falling into the trap here, but I couldn't help trying it out.
answered Sep 15 '10 at 13:33
Markus Winand ♦♦
I like the solution above but I would change the query to not use a function. The application code would pass along 2 dates which would represent the "between" dates so that the following index can be used:
CREATE INDEX emp_date_of_birth ON employees (date_of_birth);
This answer is marked "community wiki".
answered Mar 02 '11 at 23:41