Postgresql Find Substring In Powershell Script If Statement