• Ivy Seo

Grant privileges for Postgres from C#


GRANT ALL PRIVILEGES :

cmd.CommandText = "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO test_user";
cmd.CommandText = "GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO test_user;";

SUPERUSER to run queries :

cmd.CommandText = "ALTER ROLE test_user SUPERUSER;";