DF mes-application: fix problem with creating function in views.sql