Re: Read only user permission

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: Read only user permission
Дата
Msg-id 14f02a5e-4f6d-70a2-3cfb-fb783748c64a@gmail.com
обсуждение исходный текст
Ответ на Re: Read only user permission  (Hellen Jiang <hjiang@federatedwireless.com>)
Список pgsql-general
On 8/23/23 13:23, Hellen Jiang wrote:
@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face {font-family:DengXian; panose-1:2 1 6 0 3 1 1 1 1 1;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face {font-family:"\@DengXian"; panose-1:2 1 6 0 3 1 1 1 1 1;}p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; font-size:10.0pt; font-family:"Calibri",sans-serif;}span.EmailStyle19 {mso-style-type:personal-reply; font-family:"Calibri",sans-serif; color:windowtext;}.MsoChpDefault {mso-style-type:export-only; font-size:10.0pt; mso-ligatures:none;}div.WordSection1 {page:WordSection1;}

Sorry it is a typo in the email. My readonly role is dbreadonly. It works well so far except no access to new tables created by read write role. It has access to new tables created by admin role.

I granted dbreadonly as the following:

-- Read-only role
GRANT CONNECT ON DATABASE mydatabase TO dbreadonly;
GRANT USAGE ON SCHEMA public TO dbreadonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO dbreadonly;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO dbreadonly;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO dbreadonly;

 


Is "public" a good schema to use for this sort of thing, or does it matter?

В списке pgsql-general по дате отправления:

Предыдущее
От: Hellen Jiang
Дата:
Сообщение: Re: Read only user permission
Следующее
От: Tushar Takate
Дата:
Сообщение: Re: PostgreSQL DB cluster migration from centos7/RHEL7/OEL7 to RHEL8