Postgresql Find Substring In Python String