Re: Setting default privs for a user doesn't seem to work.
| От | Albe Laurenz |
|---|---|
| Тема | Re: Setting default privs for a user doesn't seem to work. |
| Дата | |
| Msg-id | A737B7A37273E048B164557ADEF4A58B05785DA1@ntex2010i.host.magwien.gv.at обсуждение исходный текст |
| Ответ на | Setting default privs for a user doesn't seem to work. ("Gauthier, Dave" <dave.gauthier@intel.com>) |
| Список | pgsql-general |
Dave Gauthier wrote: > What's wrong with this picture. Trying (failing) to create a user called "select" with default select > privs and nothing else. Demo below. Comments in red... > > sde=# alter default privileges for user "select" grant select on tables to "select"; > ALTER DEFAULT PRIVILEGES > > sde=# create table foo (a text); <-- note, the "postgres" user is creating the foo table, not > "select" > CREATE TABLE > > fcadsql7> psql --user=select sde <-- connect as "select" user and try to select from the new "foo" > table. This fails. > > sde=> select * from foo; > ERROR: permission denied for relation foo <--- Brrrrrt! Sure, that's how it should be. To allow "select" to read all tables that "postgres" creates, use ALTER DEFAULT PRIVILEGES FOR USER "postgres" GRANT SELECT ON TABLES TO "select"; Yours, Laurenz Albe
В списке pgsql-general по дате отправления: