ERROR: operator does not exist: timestamp without time zone + double precision
LINE 3: where rnum <= ((INDATE + (DAYS)) - INDATE+1))…
^
select count(*)
from (select rnum from (select ROW_NUMBER () OVER() rnum
from pg_class) a1
where rnum <= ((INDATE + (DAYS)) - INDATE+1))a5
where to_char(INDATE +rnum-1, ‘DY’ ) in ( ‘SAT’, ‘SUN’)
CONTEXT: PL/pgSQL function gcars_batch.fnc_get_weekenddays(timestamp without time zone,double precision)