Privilege problems: access denied on select for owner?

Поиск
Список
Период
Сортировка
От Nathan Jahnke
Тема Privilege problems: access denied on select for owner?
Дата
Msg-id 89e8c360908031139t23822c9bh4cc59896a17d074f@mail.gmail.com
обсуждение исходный текст
Ответы Re: Privilege problems: access denied on select for owner?
Re: Privilege problems: access denied on select for owner?
Список pgsql-general
Hi all,

Having some trouble today accessing tables in a database:

sample=# \l+
                            List of databases
   Name    |  Owner   | Encoding | Tablespace |        Description
-----------+----------+----------+------------+---------------------------
 postgres  | postgres | UTF8     | pg_default |
 root      | root     | UTF8     | pg_default |
 sample     | sample    | UTF8     | pg_default |
[...]

sample=# \z users
      Access privileges for database "sample"
 Schema |     Name     | Type  | Access privileges
--------+--------------+-------+-------------------
 public | users | table |
(1 row)

sample=#

So the role "sample" owns the database "sample" and has default
privileges on the table "users" in that database. From the manual:

"There is no need to grant privileges to the owner of an object
(usually the user that created it), as the owner has all privileges by
default."

But:

sample@server:~$ psql -U sample sample
Welcome to psql 8.3.7, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

sample=> select * from users;
ERROR:  permission denied for relation users
sample=>

I can SELECT from this table if I give the privilege to "sample" by
root on the table. But this is not what I want; I want "sample" to
have all privileges on all tables in the database "sample".

Any insight would be much appreciated.


Thanks,

Nathan

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

Предыдущее
От: Andreas Kalsch
Дата:
Сообщение: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"
Следующее
От: Sam Mason
Дата:
Сообщение: Re: \copy command error