How does one deal with transactions in PGAgent jobs? I have many scenarios 
where I will loop through a set of data, run a function on each, and commit 
whatever succeeds or rollback whatever fails. In Oracle, I was doing this with 
pl/sql scripts run via sqlplus and cron. In Postgres, I set them up as pgAgent 
jobs but so far it is either committing or rolling back all. Since I cannot do 
any transactions within the functions being run by pgAgent, can the pgAgent 
step SQL contain support for them?




Reply via email to