Index: pgaSchedule.cpp =================================================================== RCS file: /projects/pgadmin3/src/agent/pgaSchedule.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -Lsrc/agent/pgaSchedule.cpp -Lsrc/agent/pgaSchedule.cpp -u -w -r1.14 -r1.15 --- src/agent/pgaSchedule.cpp +++ src/agent/pgaSchedule.cpp @@ -62,7 +62,7 @@ bool pgaSchedule::DropObject(wxFrame *frame, wxTreeCtrl *browser) { - return GetDatabase()->ExecuteVoid(wxT("DELETE FROM pgadmin.pga_jobschedule WHERE jscid=") + NumToStr(GetId())); + return GetDatabase()->ExecuteVoid(wxT("DELETE FROM pgagent.pga_jobschedule WHERE jscid=") + NumToStr(GetId())); } @@ -120,7 +120,7 @@ pgaSchedule *schedule=0; pgSet *schedules= collection->GetDatabase()->ExecuteSet( - wxT("SELECT * FROM pgadmin.pga_schedule\n") + wxT("SELECT * FROM pgagent.pga_schedule\n") wxT(" WHERE jscjobid=") + NumToStr(collection->GetJob()->GetId()) + wxT("\n") + restriction + wxT(" ORDER BY jscid")); Index: dlgStep.cpp =================================================================== RCS file: /projects/pgadmin3/src/agent/dlgStep.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -Lsrc/agent/dlgStep.cpp -Lsrc/agent/dlgStep.cpp -u -w -r1.13 -r1.14 --- src/agent/dlgStep.cpp +++ src/agent/dlgStep.cpp @@ -170,7 +170,7 @@ else db = qtString(cbDatabase->GetValue()); - sql = wxT("INSERT INTO pgadmin.pga_jobstep (jstjobid, jstname, jstdesc, jstenabled, jstkind, jstonerror, jstcode, jstdbname)\n") + sql = wxT("INSERT INTO pgagent.pga_jobstep (jstjobid, jstname, jstdesc, jstenabled, jstkind, jstonerror, jstcode, jstdbname)\n") wxT("SELECT ") + jstjobid + wxT(", ") + qtString(name) + wxT(", ") + qtString(txtComment->GetValue()) + wxT(", ") + BoolToStr(chkEnabled->GetValue()) + wxT(", ") + qtString(kind) + wxT(", ") + qtString(onerror) + wxT(", ") + qtString(sqlBox->GetText()) + wxT(", ") + db; @@ -242,7 +242,7 @@ } if (!vars.IsEmpty()) - sql = wxT("UPDATE pgadmin.pga_jobstep\n") + sql = wxT("UPDATE pgagent.pga_jobstep\n") wxT(" SET ") + vars + wxT("\n") wxT(" WHERE jstid=") + NumToStr(step->GetId()); } Index: pgaStep.cpp =================================================================== RCS file: /projects/pgadmin3/src/agent/pgaStep.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -Lsrc/agent/pgaStep.cpp -Lsrc/agent/pgaStep.cpp -u -w -r1.13 -r1.14 --- src/agent/pgaStep.cpp +++ src/agent/pgaStep.cpp @@ -37,7 +37,7 @@ bool pgaStep::DropObject(wxFrame *frame, wxTreeCtrl *browser) { - return GetDatabase()->ExecuteVoid(wxT("DELETE FROM pgadmin.pga_jobstep WHERE jstid=") + NumToStr(GetId())); + return GetDatabase()->ExecuteVoid(wxT("DELETE FROM pgagent.pga_jobstep WHERE jstid=") + NumToStr(GetId())); } @@ -86,7 +86,7 @@ pgaStep *step=0; pgSet *steps= collection->GetDatabase()->ExecuteSet( - wxT("SELECT * FROM pgadmin.pga_jobstep\n") + wxT("SELECT * FROM pgagent.pga_jobstep\n") wxT(" WHERE jstjobid=") + NumToStr(collection->GetJob()->GetId()) + wxT("\n") + restriction + wxT(" ORDER BY jstid")); Index: pgaJob.cpp =================================================================== RCS file: /projects/pgadmin3/src/agent/pgaJob.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -Lsrc/agent/pgaJob.cpp -Lsrc/agent/pgaJob.cpp -u -w -r1.12 -r1.13 --- src/agent/pgaJob.cpp +++ src/agent/pgaJob.cpp @@ -49,7 +49,7 @@ bool pgaJob::DropObject(wxFrame *frame, wxTreeCtrl *browser) { - return GetDatabase()->ExecuteVoid(wxT("DELETE FROM pgadmin.pga_job WHERE jobid=") + NumToStr(GetId())); + return GetDatabase()->ExecuteVoid(wxT("DELETE FROM pgagent.pga_job WHERE jobid=") + NumToStr(GetId())); } @@ -117,8 +117,8 @@ pgaJob *job=0; pgSet *jobs= collection->GetDatabase()->ExecuteSet( - wxT("SELECT *, ''::text AS joblastresult FROM pgadmin.pga_job j\n") - wxT(" JOIN pgadmin.pga_jobclass cl ON cl.jclid=jobjclid\n") + wxT("SELECT *, ''::text AS joblastresult FROM pgagent.pga_job j\n") + wxT(" JOIN pgagent.pga_jobclass cl ON cl.jclid=jobjclid\n") + restriction + wxT(" ORDER BY jobname")); Index: dlgSchedule.cpp =================================================================== RCS file: /projects/pgadmin3/src/agent/dlgSchedule.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -Lsrc/agent/dlgSchedule.cpp -Lsrc/agent/dlgSchedule.cpp -u -w -r1.14 -r1.15 --- src/agent/dlgSchedule.cpp +++ src/agent/dlgSchedule.cpp @@ -239,7 +239,7 @@ jscjobid = NumToStr(jobId); else jscjobid = wxT(""); - sql = wxT("INSERT INTO pgadmin.pga_jobschedule (jscjobid, jscname, jscdesc, jscenabled, jsckind, ") + sql = wxT("INSERT INTO pgagent.pga_jobschedule (jscjobid, jscname, jscdesc, jscenabled, jsckind, ") wxT("jscstart, jscend, jscschedule, jsclist)\n") wxT("VALUES(") + jscjobid + wxT(", ") + qtString(name) + wxT(", ") + qtString(txtComment->GetValue()) + wxT(", ") + BoolToStr(chkEnabled->GetValue()) + wxT(", ") + qtString(kind) + wxT(", ") Index: dlgJob.cpp =================================================================== RCS file: /projects/pgadmin3/src/agent/dlgJob.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -Lsrc/agent/dlgJob.cpp -Lsrc/agent/dlgJob.cpp -u -w -r1.13 -r1.14 --- src/agent/dlgJob.cpp +++ src/agent/dlgJob.cpp @@ -96,7 +96,7 @@ int dlgJob::Go(bool modal) { - pgSet *jcl=connection->ExecuteSet(wxT("SELECT jclname FROM pgadmin.pga_jobclass")); + pgSet *jcl=connection->ExecuteSet(wxT("SELECT jclname FROM pgagent.pga_jobclass")); if (jcl) { while (!jcl->Eof()) @@ -303,10 +303,10 @@ if (!job) { - sql = wxT("INSERT INTO pgadmin.pga_job (jobid, jobjclid, jobname, jobdesc, jobenabled)\n") + sql = wxT("INSERT INTO pgagent.pga_job (jobid, jobjclid, jobname, jobdesc, jobenabled)\n") wxT("SELECT , jcl.jclid, ") + qtString(GetName()) + wxT(", ") + qtString(txtComment->GetValue()) + wxT(", ") + BoolToStr(chkEnabled->GetValue()) + wxT("\n") - wxT(" FROM pgadmin.pga_jobclass jcl WHERE jclname=") + qtString(cbJobclass->GetValue()); + wxT(" FROM pgagent.pga_jobclass jcl WHERE jclname=") + qtString(cbJobclass->GetValue()); } return sql; } @@ -332,7 +332,7 @@ { if (!vars.IsEmpty()) vars.Append(wxT(", ")); - vars.Append(wxT("jobjclid= (SELECT jclid FROM pgadmin.pga_jobclass WHERE jclname=") + qtString(cbJobclass->GetValue()) + wxT(")")); + vars.Append(wxT("jobjclid= (SELECT jclid FROM pgagent.pga_jobclass WHERE jclname=") + qtString(cbJobclass->GetValue()) + wxT(")")); } if (chkEnabled->GetValue() != job->GetEnabled()) { @@ -348,7 +348,7 @@ } if (!vars.IsEmpty()) - sql = wxT("UPDATE pgadmin.pga_job SET ") + vars + wxT("\n") + sql = wxT("UPDATE pgagent.pga_job SET ") + vars + wxT("\n") wxT(" WHERE jobid=") + NumToStr(job->GetId()); } @@ -377,7 +377,7 @@ for (index = 0 ; index < (int)tmpSteps.GetCount() ; index++) { - sql += wxT("DELETE FROM pgadmin.pga_jobstep WHERE jobid=") + sql += wxT("DELETE FROM pgagent.pga_jobstep WHERE jobid=") + NumToStr(((pgaStep*)StrToLong(tmpSteps.Item(index)))->GetId()) + wxT(";\n"); } @@ -398,7 +398,7 @@ for (index = 0 ; index < (int)tmpSchedules.GetCount() ; index++) { - sql += wxT("DELETE FROM pgadmin.pga_jobschedule WHERE jobid=") + sql += wxT("DELETE FROM pgagent.pga_jobschedule WHERE jobid=") + NumToStr(((pgaStep*)StrToLong(tmpSchedules.Item(index)))->GetId()) + wxT(";\n"); } Index: dlgProperty.cpp =================================================================== RCS file: /projects/pgadmin3/src/ui/dlgProperty.cpp,v retrieving revision 1.112 retrieving revision 1.113 diff -Lsrc/ui/dlgProperty.cpp -Lsrc/ui/dlgProperty.cpp -u -w -r1.112 -r1.113 --- src/ui/dlgProperty.cpp +++ src/ui/dlgProperty.cpp @@ -1304,10 +1304,10 @@ if (!sql.IsEmpty()) { // We should only need to get an ID if inserting a new Job - if (sql.Contains(wxT("")) && sql.StartsWith(wxT("INSERT INTO pgadmin.pga_job"))) + if (sql.Contains(wxT("")) && sql.StartsWith(wxT("INSERT INTO pgagent.pga_job"))) { - id=StrToLong(connection->ExecuteScalar(wxT("SELECT nextval('pgadmin.pga_job_jobid_seq');"))); + id=StrToLong(connection->ExecuteScalar(wxT("SELECT nextval('pgagent.pga_job_jobid_seq');"))); int pos; while ((pos=sql.Find(wxT(""))) >= 0)