pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedPermission Read Only User
3+ messages / 3 participants
[nested] [flat]
* Permission Read Only User
@ 2019-03-15 23:37 Sathish Kumar <satcse88@gmail.com>
2019-03-15 23:44 ` Re: Permission Read Only User Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 1 reply; 3+ messages in thread
From: Sathish Kumar @ 2019-03-15 23:37 UTC (permalink / raw)
To: pgsql-general
Hi All,
I have created a read only user to perform select statements on our
database but whenever we create new tables on the database this user is
unable to view it unless I grant select again for this table. Is there a
way I can make select as default permission for this user so that in future
if I create any new tables, it will be still accessible.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Permission Read Only User
2019-03-15 23:37 Permission Read Only User Sathish Kumar <satcse88@gmail.com>
@ 2019-03-15 23:44 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-03-16 01:02 ` Re: Permission Read Only User Ron <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Klaver @ 2019-03-15 23:44 UTC (permalink / raw)
To: Sathish Kumar <satcse88@gmail.com>; pgsql-general
On 3/15/19 4:37 PM, Sathish Kumar wrote:
> Hi All,
>
> I have created a read only user to perform select statements on our
> database but whenever we create new tables on the database this user is
> unable to view it unless I grant select again for this table. Is there a
> way I can make select as default permission for this user so that in
> future if I create any new tables, it will be still accessible.
Maybe this?:
https://www.postgresql.org/docs/11/sql-alterdefaultprivileges.html
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Permission Read Only User
2019-03-15 23:37 Permission Read Only User Sathish Kumar <satcse88@gmail.com>
2019-03-15 23:44 ` Re: Permission Read Only User Adrian Klaver <adrian.klaver@aklaver.com>
@ 2019-03-16 01:02 ` Ron <ronljohnsonjr@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Ron @ 2019-03-16 01:02 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 3/15/19 6:44 PM, Adrian Klaver wrote:
> On 3/15/19 4:37 PM, Sathish Kumar wrote:
>> Hi All,
>>
>> I have created a read only user to perform select statements on our
>> database but whenever we create new tables on the database this user is
>> unable to view it unless I grant select again for this table. Is there a
>> way I can make select as default permission for this user so that in
>> future if I create any new tables, it will be still accessible.
>
> Maybe this?:
>
> https://www.postgresql.org/docs/11/sql-alterdefaultprivileges.html
That's just what we used.
Create a role READONLY who is granted CONNECT and alter the default
permissions on all your schemas to grant SELECT to that role.
Then create "user" roles which inherit from READONLY.
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2019-03-16 01:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-03-15 23:37 Permission Read Only User Sathish Kumar <satcse88@gmail.com>
2019-03-15 23:44 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-03-16 01:02 ` Ron <ronljohnsonjr@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox