Code
Code

Reputation: 6251

Postgres: prevent new user from creating tables, without superuser

In Cloud SQL Postgres, where superuser permissions are not accessible, how can I prevent a new user from creating tables?

I know that REVOKE CREATE ON SCHEMA public FROM public works, but this seem to require superuser permissions, as I get a WARNING: no privileges could be revoked for "public" error.

Upvotes: 2

Views: 294

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246483

You have to run that statement as the user who owns public.

Upvotes: 2

Related Questions