Postgresql Find Substring Python Function Overloading