Can create function. Postgresql функции. create function postgresql. returns table postgresql. функция return.