From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Preventing database listing? |
Date: | 2009-10-22 05:27:17 |
Message-ID: | 4ADFED35.7000204@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | A.Bhattacharya | 2009-10-22 06:19:57 | FW: Incompatible library : Missing Magic Block |
Previous Message | A.Bhattacharya | 2009-10-22 05:16:17 | Incompatible library : Missing Magic Block |