From: Kris Jurka <books@ejurka.com>
To: Andy Burgard <andy.burgard@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: a problem with getting correct info about table's privileges
Date: Thu, 1 Jul 2010 21:37:43 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.1007012135050.12707@leary.csoft.net> (raw)
In-Reply-To: <AANLkTinvnCiL4L7rucFkbBahoLMjQqvUhRMUmfXksVmy@mail.gmail.com>
References: <AANLkTinvnCiL4L7rucFkbBahoLMjQqvUhRMUmfXksVmy@mail.gmail.com>
On Fri, 4 Jun 2010, Andy Burgard wrote:
> I have a problem with getting correct info about table's privileges. I have
> a table with a SELECT privilege granted to "not_owner" user by the table's
> owner. However when I connect to the database as "not_owner" and ask for the
> privileges (using java.sql.DatabaseMetaData.getTablePrivileges()) on this
> table granted to "not_owner" I get DELETE, SELECT, and TRIGGER.
>
> Does anybody have an idea what is going on?
It's not clear exactly what you are doing and expecting. It sounds a
little like you are expecting getTablePrivileges to return just the
privileges for the current user, but it will return the privileges for all
users.
What do you get from the following?
SELECT relacl from pg_class WHERE relname = 'mytablename'
Kris Jurka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, andy.burgard@gmail.com
Subject: Re: a problem with getting correct info about table's privileges
In-Reply-To: <alpine.BSO.2.00.1007012135050.12707@leary.csoft.net>
References: <AANLkTinvnCiL4L7rucFkbBahoLMjQqvUhRMUmfXksVmy@mail.gmail.com> <alpine.BSO.2.00.1007012135050.12707@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox