Only substring of `schedule` passed to `cron.schedule` saved to `jobname` column
iamchubko opened this issue · 1 comments
iamchubko commented
To reproduce, run the following
SELECT cron.schedule(
'very-long-name-92bb33cb-e212-45e5-9885-172bee2c4562-end-of-the-very-long-name',
'00 18 21 01 *',
'$$ SELECT 1 $$'
);
-- `jobname` column will contain 'very-long-name-92bb33cb-e212-45e5-9885-172bee2c4562-end-of-the-'
In my experience, substring might be of different sizes. In some cases it was 49 chars (but somehow I couldn't reproduce it anymore), in others - 63, like with the query above
If that's a max allowed length of the string, why is it successfully schedules it without an error?
Version:
select * from pg_available_extensions where name='pg_cron'; -- 1.4-1
Might be related:
#209
marcoslot commented
This is fixed in recent versions of pg_cron. The older versions used the name type.