Skip to content

Instantly share code, notes, and snippets.

View ShepelievD's full-sized avatar
💻
Focusing

Dmytro Shepeliev ShepelievD

💻
Focusing
View GitHub Profile
@xlucasdemelo
xlucasdemelo / dropSchemas.sql
Created February 21, 2017 19:43
Drop all schemas from a database postgresql
SET search_path = _global, pg_catalog;
CREATE OR REPLACE FUNCTION drop_all ()
RETURNS VOID AS
$$
DECLARE rec RECORD;
BEGIN
-- Get all the schemas
FOR rec IN
select distinct schemaname