select * 
from rpt.f131_2000_2015_pg(
 cast($1 as varchar),
  cast($2 as varchar), 
  cast($3 as int8), 
cast(TO_TIMESTAMP($4,'DD.MM.YYYY') as timestamp))
order by v1
