Drop all tables in a database, but keep the database.

1
2
3
4
5
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;

DROP SCHEMA public CASCADE;
CREATE SCHEMA public;

Reference: stakoverflow | Drop all tables in PostgreSQL?