/* add a job and get its id: */
1 /*1=Routine Maintenance*/
, 'DELETE_NAMES' /* job name */
/* add a step to the job: */
pgagent.pga_jobstep (jstjobid, jstname, jstkind, jstcode, jstdbname)
, 'DELETE_NAMES' /* step name */
, 'BEGIN DELETE_NAMES; END;' /* the sql to run */
, 'somedatabase' /* the name of the database to run the step against */
/* add a schedule to the job. This one runs every day at midnight: */
insert into pgagent.pga_schedule (
, '{t,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f}'
, '{t,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f}'
, '{f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f}'
, '{f,f,f,f,f,f,f,f,f,f,f,f}'