Python Match Case Substring In Postgresql