| From: | Christoph Moench-Tegeder <cmt(at)burggraben(dot)net> |
|---|---|
| To: | Atul Kumar <akumar14871(at)gmail(dot)com> |
| Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: default privileges are npt working |
| Date: | 2024-08-30 12:49:01 |
| Message-ID: | ZtG_vWtq0xFY98FG@sciurus.exwg.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
## Atul Kumar (akumar14871(at)gmail(dot)com):
> Then I granted default "select" privileges to reader *user *to read data of
> all tables created by writer *user* using below command:
>
> alter default privileges in schema <custom schema> grant select on tables
> to <reader user>.
"ALTER DEFAULT PRIVILEGES allows you to set the privileges that
will be applied to objects created in the future. (It does not affect
privileges assigned to already-existing objects.)"
That's the first two sentences from
https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html
If you want to grant/revoke access on existing objects, use plain
old GRANT/REVOKE: https://www.postgresql.org/docs/current/sql-grant.html
Regards,
Christoph
--
Spare Space.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2024-08-30 13:08:24 | Re: Analytic Function Bug |
| Previous Message | Greg Sabino Mullane | 2024-08-30 12:45:56 | Re: PgBackRest full backup first time : Verification |