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