select * from rpt.f39u2asv_stat_tt_pg(
cast($1 as bigint), 
$2, 
cast($3 as bigint), 
cast($4 as bigint), 
cast($5 as bigint), 
cast($6 as bigint), 
$7, 
$8, 
cast(to_timestamp($9,'dd.mm.yyyy') as timestamp), 
cast(to_timestamp($10,'dd.mm.yyyy') as timestamp), 
cast($11 as  bigint), 
cast($12 as  bigint), 
cast($13 as  bigint), 
cast($14 as  bigint), 
cast($15 as  bigint), 
cast($16 as  bigint),
cast($17 as  bigint),
cast($18 as  bigint),
cast($19 as  bigint))
