I'm trying to drop a database with force, but I get the following ERROR: syntax error at or near "WITH"
postgres=# DROP DATABASE IF EXISTS my_database WITH (FORCE);
ERROR: syntax error at or near "WITH"
LINE 1: DROP DATABASE IF EXISTS my_database WITH (FORCE);
I'm using Postgres 16.0 (Ubuntu 16.0-1.pgdg22.04+1) which should support this as far as I can tell ( https://www.postgresql.org/docs/current/sql-dropdatabase.html )
Any thoughts on what could cause this error?
UPDATE
Turned out I was actually logged-in in a cluster from an older version (v10). Migrating the db to the new v16 cluster and changing it's port to the default 5432 did the trick.