mirror of
https://github.com/hanzoai/ca.git
synced 2026-11-03 18:08:27 +00:00
18 lines
387 B
SQL
18 lines
387 B
SQL
\set ON_ERROR_STOP on
|
|
|
|
SELECT pg_terminate_backend (pg_stat_activity.pid)
|
|
FROM pg_stat_activity
|
|
WHERE
|
|
pg_stat_activity.datname = 'trustycadb'
|
|
AND pid <> pg_backend_pid ();
|
|
|
|
DROP DATABASE IF EXISTS trustycadb;
|
|
|
|
-- Cluster-level cleanup (schema objects are gone with the database)
|
|
DROP USER IF EXISTS trustyca;
|
|
DROP ROLE IF EXISTS frontend;
|
|
DROP ROLE IF EXISTS backend;
|
|
|
|
\list
|
|
\dn
|