Postgresql Find Last Occurrence Of Character In String Sql