Re: Preventing database listing?

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Preventing database listing?
Дата
Msg-id 4ADFED35.7000204@hogranch.com
обсуждение исходный текст
Ответ на Preventing database listing?  (Adam Rich <adam.r@sbcglobal.net>)
Список pgsql-general
Adam Rich wrote:
>
> This seems like a simple question that would have come up, but I'm not
> able to find an answer in google, PG docs, or PG mailing list archives.
>
> How do I prevent a user from being able to list all databases in my
> cluster?  I want to restrict them to seeing just the databases they
> have connect rights to.


the \l command that lists all databases excutes a query like...

SELECT d.datname as "Name",
       r.rolname as "Owner",
       pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding"
FROM pg_catalog.pg_database d
  JOIN pg_catalog.pg_roles r ON d.datdba = r.oid
ORDER BY 1;

so, perhaps revoking read permissions on pg_catalog.pg_database, but I
have no idea what other problems that might cause





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

Предыдущее
От: Sam Jas
Дата:
Сообщение: Re: postgres doesn't start after crash
Следующее
От: Mike Christensen
Дата:
Сообщение: Design question about partitioning order information across tables