Re: pg_agent jobs

2023-10-02 Thread Adrian Klaver
On 10/2/23 00:50, Giovanni Biscontini wrote: Hi, Yes I know I've to use the "on error" property, but the cue is to raise an error if query has a false result: for my knowledges the only way to do it is to "create or replace" a PL/pgSQL procedure that than uses a "RAISE ERROR" inside, but isn't

Re: pg_agent jobs

2023-10-02 Thread Giovanni Biscontini
Hi, Yes I know I've to use the "on error" property, but the cue is to raise an error if query has a false result: for my knowledges the only way to do it is to "create or replace" a PL/pgSQL procedure that than uses a "RAISE ERROR" inside, but isn't there a more "SQL only way to do it? thanks in ad

Re: pg_agent jobs

2023-09-29 Thread Adrian Klaver
On 9/29/23 08:55, Giovanni Biscontini wrote: Hello all members, here's my question: db version 14.5 we have to create a pg_agent job with 2 steps: 1_step execute query: if query result is true or find > 0 records then process next step, else it stops executing job 2_step execute batch command w

pg_agent jobs

2023-09-29 Thread Giovanni Biscontini
Hello all members, here's my question: db version 14.5 we have to create a pg_agent job with 2 steps: 1_step execute query: if query result is true or find > 0 records then process next step, else it stops executing job 2_step execute batch command we tried to seta as 1_step the query: SELECT EXIST