select *
from rpt.f116U_pg(
CAST($1 AS int8),
CAST($2 AS int8),
CAST(TO_TIMESTAMP($3,'DD.MM.YYYY') AS TIMESTAMP),
CAST(TO_TIMESTAMP($4,'DD.MM.YYYY') AS TIMESTAMP))
