DEFINITIONS
Definitions More Info.
Definition ID
810
Title
POSTGRESQL
Category
NOTES
Definition
DROP ALL ROLES
Definition Description
-- Aşağıdaki script bir kerede istediğiniz tüm rolleri drop eder.
do $$ DECLARE rolename TEXT;
BEGIN FOR rolename IN SELECT
rolname
FROM
pg_roles
WHERE
rolname NOT IN ( 'pg_signal_backend',
'postgres' ) loop EXECUTE 'DROP ROLE ' || ( rolename );
END loop;
END $$;
RecordBy
cunay
Record Date
17-10-2017 09:39:03
Düzenle
Kopyala
Sil