Re: a problem with getting correct info about table's privileges

From: Kris Jurka <books(at)ejurka(dot)com>
To: Andy Burgard <andy(dot)burgard(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: a problem with getting correct info about table's privileges
Date: 2010-07-02 01:37:43
Message-ID: alpine.BSO.2.00.1007012135050.12707@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message S K 2010-07-02 02:42:21 Re: Transient runtime error: java.lang.NegativeArraySizeException from org.postgresql.core.PGStream.ReceiveTupleV3(PGStream.java:349) ...
Previous Message Kris Jurka 2010-07-02 01:27:13 Re: Transient runtime error: java.lang.NegativeArraySizeException from org.postgresql.core.PGStream.ReceiveTupleV3(PGStream.java:349) ...