Re: pg_cron for vacuum - dynamic table set

2022-02-03 Thread Ron
On 2/3/22 3:29 PM, saket bansal wrote: Hi, I am trying to schedule pg_cron to generate a set of commands and then run them. E.g |select 'vacuum freeze '||table_name from inventory_for_vacuum \gexec| . This works well at command line, but when scheduled in pg_cron, it fails with syntax error |ER

Re: pg_cron for vacuum - dynamic table set

2022-02-03 Thread Michael Lewis
Can't you use a do script to construct and execute the statement? >

Re: pg_cron for vacuum - dynamic table set

2022-02-03 Thread David G. Johnston
On Thu, Feb 3, 2022 at 2:29 PM saket bansal wrote: > Hi, I am trying to schedule pg_cron to generate a set of commands and then > run them. E.g select 'vacuum freeze '||table_name from > inventory_for_vacuum \gexec . This works well at command line, but when > scheduled in pg_cron, it fails with

Re: pg_cron for vacuum - dynamic table set

2022-02-03 Thread Adrian Klaver
On 2/3/22 1:29 PM, saket bansal wrote: Hi, I am trying to schedule pg_cron to generate a set of commands and then run them. E.g |select 'vacuum freeze '||table_name from inventory_for_vacuum \gexec| . This works well at command line, but when scheduled in pg_cron, it fails with syntax error |ER

pg_cron for vacuum - dynamic table set

2022-02-03 Thread saket bansal
Hi, I am trying to schedule pg_cron to generate a set of commands and then run them. E.g select 'vacuum freeze '||table_name from inventory_for_vacuum \gexec . This works well at command line, but when scheduled in pg_cron, it fails with syntax error ERROR: syntax error at or near "\" . Since vacuu