Thread: Re: [BUGS] Database/Table Owner Question

Re: [BUGS] Database/Table Owner Question

From
"Kevin Grittner"
Date:
>>> <Michael.L.Blume@frb.gov> wrote:
> We have a lot of test databases with multiple db_owners, but very few

> superusers, and table_owners switch all the time.

A quick, untested idea:

Create a table_owner role.

Create your users with NOINHERIT and GRANT table_owner to them as
appropriate.

REVOKE CREATE ON SCHEMA public FROM public.

GRANT CREATE ON SCHEMA PUBLIC TO table_owner.

A user would need to SET ROLE table_owner to create a table.
RESET ROLE would put them back to normal.

Just a thought....

-Kevin