1、UPDATE pg_database SET datistemplate='false' WHERE datname='DB';
2、SELECT * from pg_database where datname='DB';
3、DROP DATABASE DB;