Hint: this'd work a lot better if levelstr were declared varchar() or text. The padding spaces for char() are messing up your match pattern. regards, tom lane
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных