AW: Which commands are guaranteed to drop role

2020-04-14 Thread Zwettler Markus (OIZ)
> -Ursprüngliche Nachricht- > Von: Laurenz Albe > Gesendet: Sonntag, 12. April 2020 22:09 > An: Andrus ; pgsql-general > Betreff: Re: Which commands are guaranteed to drop role > > On Sun, 2020-04-12 at 00:25 +0300, Andrus wrote: > > User "cu

Re: Which commands are guaranteed to drop role

2020-04-12 Thread Andrus
Hi! You cannot write such a script, but you will have to REVOKE and change ownership and ALTER DEFAULT PRIVILEGES until no more dependencies on the role exist. I ran script as superuser. In this case more detailed information appears: ERROR: role "roletodelete" cannot be dropped because some

Re: Which commands are guaranteed to drop role

2020-04-12 Thread Laurenz Albe
On Sun, 2020-04-12 at 00:25 +0300, Andrus wrote: > User "currentuser" tries to delete role "roletodelete" from this database > using > > But got error > > ERROR: role "roletodelete" cannot be dropped because some objects depend on it > DETAIL: privileges for schema public; > > How to create s

Which commands are guaranteed to drop role

2020-04-11 Thread Andrus
Hi! Database "mydb" is owned by role "mydb_owner". User "currentuser" tries to delete role "roletodelete" from this database using revoke all on all tables in schema public,firma1 from "roletodelete" cascade; revoke all on all sequences in schema public,firma1 from "roletodelete" cascade; r