Re: pgAgent "new step" fails for batch jobs in pgAdmin3 1.10.0 Beta 2

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Kevin Field <kevinjamesfield(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: pgAgent "new step" fails for batch jobs in pgAdmin3 1.10.0 Beta 2
Date: 2009-05-05 12:20:01
Message-ID: 937d27e10905050520v757f87fcw9e4de0c2516c41bc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Mon, May 4, 2009 at 6:31 PM, Kevin Field <kevinjamesfield(at)gmail(dot)com> wrote:
>> INSERT INTO pgagent.pga_jobstep (jstid, jstjobid, jstname, jstdesc,
>> jstenabled, jstkind, jstonerror, jstcode, jstdbname, jstconnstr)
>>  SELECT <StpId>, 5, E'C:\\mybat.bat', '', true, 'b', 'f', E'C:\
>> \mybat.bat', , ;
>
> Also that <StpId> is a problem if you try to copy this out and run the
> query manually, which I had to do because when I unchecked "read only"
> and edited it to get rid of the last two parameters, I got the same
> error message about commas, leading me to think that what I saw on the
> screen was not what actually got sent to the db server by pgAdmin (so
> I'm not sure what the benefit is to being able to edit it there, if
> you have to open a query window to actually execute your edited
> version anyway.)  But when I took out "jstid, " and "<StpId>, " in
> addition, it worked.

It's because creating jobs needs to be a multi-step process so it puts
a placeholder in the SQL which will be replaced at execution time with
the result from another part of the process. It's still potentially
useful to edit the definition before sending it to the server, but I
agree it's not something you can run standalone.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2009-05-05 12:45:10 SVN Commit by dpage: r7845 - trunk/pgadmin3/pgadmin/include
Previous Message Dave Page 2009-05-05 12:17:06 Re: pgAgent "new step" fails for batch jobs in pgAdmin3 1.10.0 Beta 2