i am adding nthmonth (2) in my postgresql function , but at the time of execution it showing error "ERROR: operator does not exist: timestamp without time zone + integer" HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. QUERY: SELECT pi_date + nthMonth || ' month ' :: INTERVAL
DECLARE
beginMonth timestamp;
pi_date timestamp := to_timestamp('14-Jan-2016 01:50 AM,'DD-MON-YYYY HH:MI AM);
> beginMonth := pi_date + nthMonth || ' month ' :: INTERVAL;