citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.9k stars 195 forks source link

Select procedure based on argument type of cron_unschedule_named #347

Closed CyberDem0n closed 3 months ago

CyberDem0n commented 3 months ago

The #299 PR took care of bacward compatibility of the function, but there is still one problem left. If extension isn't updated type of the jobname field in the cron.job table is still NAME, and as a result scan was failing to find rows and unschedule a named job.

This fix is relying on the fact that SQL API of the unschedule() function is updated consistently with the cron.job table definition.