Re: [BUGS] Database/Table Owner Question - Mailing list pgsql-general

From Kevin Grittner
Subject Re: [BUGS] Database/Table Owner Question
Date
Msg-id 49A6BBBE.EE98.0025.0@wicourts.gov
Whole thread Raw
List pgsql-general
>>> <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

pgsql-general by date:

Previous
From: Torsten Bronger
Date:
Subject: Re: Getting time-dependent load statistics
Next
From: Adrian Klaver
Date:
Subject: Re: Connection refused (0x0000274D/10061).