I'm trying to initialize the pg_cron
extension in a dedicated schema named 'cron'.
I usually create the schema before creating the extension but something goes wrong in this case:
db_dev# CREATE SCHEMA cron;
CREATE SCHEMA
db_dev# CREATE EXTENSION pg_cron WITH SCHEMA cron;
ERROR: schema "cron" already exists
db_dev# DROP SCHEMA cron;
DROP SCHEMA
db_dev# CREATE EXTENSION pg_cron WITH SCHEMA cron;
ERROR: schema "cron" does not exist
db_dev# SHOW server_version;
server_version
════════════════════════════════
13.1 (Debian 13.1-1.pgdg100+1)
(1 row)
Anything that I might have missed?
Got it.
pg_cron
will create thecron
schema itself. There is no need to create it beforehand.