Postgresql Find Substring In Powershell If Statement