Repository navigation
Replies: 1 comment 3 replies
|
I'm not sure what Test=# select format('["--dbname=postgresql://{0}:{1}@{2}:{3}/{4}","--format=c","--file=Backups\\backup-%s.sql"]',current_date)::jsonb;
format
------------------------------------------------------------------------------------------------------
["--dbname=postgresql://{0}:{1}@{2}:{3}/{4}", "--format=c", "--file=Backups\\backup-2023-08-18.sql"]
(1 row) |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am using pg_timetable to generate dump files for the database. While it is functioning correctly, I'm facing an issue with incorporating the current date into the generated file name. Here's the relevant portion of my code:
IF NOT EXISTS (SELECT FROM timetable.chain WHERE chain_name='CreateBackup') THEN PERFORM timetable.add_job('CreateBackup', '* * * * *', 'pg_dump','["--dbname=postgresql://{0}:{1}@{2}:{3}/{4}","--format=c","--file=Backups\\backup-%date%.sql"]'::jsonb,'PROGRAM'); END IF;All reactions