the function in this example can be substr(a_text_field from 1 to 3) or substr(a_text_function from 4 to 3).
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных