Skip to content

Instantly share code, notes, and snippets.

@keepitsimple
Last active August 29, 2015 14:13
Show Gist options
  • Save keepitsimple/e959900a79f75ae806a7 to your computer and use it in GitHub Desktop.
Save keepitsimple/e959900a79f75ae806a7 to your computer and use it in GitHub Desktop.
Postgresql remove all entities (tables, ets) from the schema
-- drop all object in the schema
drop schema public cascade;
create schema public;
-- change owner of the schema and all objects
REASSIGN OWNED BY old_role [, ...] TO new_role
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment