What I want to do in the db is have MYFUNC()
I then want to send a query down to the db in the form of
select * from foo where col = 'my name'
and have the database handle it like:
select * from foo where MYFUNC(col) = MYFUNC('my name')
So I want my db functions to be hidden to the developer. I want them to match based on a matching algorithm but when the noobs look at it, they will say, 'Oh, Ill just match the name to the name and be done with it!'
Is there a way to hide this function so the developer does not need to remember to use the function each time?
This is in PostgresSQL 9.2 by the way.
colis indexed, the first query is index seek, but the second is full table scan.