Re: pg_agent jobs
От | Adrian Klaver |
---|---|
Тема | Re: pg_agent jobs |
Дата | |
Msg-id | 1b7c2046-049b-4117-90e1-a23437f74c6e@aklaver.com обсуждение исходный текст |
Ответ на | Re: pg_agent jobs (Giovanni Biscontini <biscontini.g@es2000.it>) |
Список | pgsql-general |
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 there a more "SQL only way to do it? > thanks in advance, G > 1) select 1/count(*) from table where ... 2) Use anonymous function DO: https://www.postgresql.org/docs/current/sql-do.html FYI, there are other programs that do roughly the same thing. You might want to check them out to see if they work better for your tasks: pg_cron https://github.com/citusdata/pg_cron pg_timetable https://pg-timetable.readthedocs.io/en/master/ -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: