added type casting to insert values to temp table (VALUES ($1::varchar(255), $2::int, ...)) to not cause "value too long for type character varying(255)" exceptions