Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 3BF5E6330E7 for ; Thu, 1 Jul 2010 22:38:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 87659-07 for ; Fri, 2 Jul 2010 01:37:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 8A9B6632B68 for ; Thu, 1 Jul 2010 22:37:56 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id A85FA28412; Thu, 1 Jul 2010 21:37:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=s7wRVRtOhFJGeW5KfTc6NZQQN/o=; b=hZvTru 6cmmRvbMz1NCSMwFtvYjraOc7bcYK7APWKJv/zTkSdnPyQ4Gr/nflXrdphZTEetX mb6Sqa5+PuzeJkURPM2enJzCfq4fiMA666Ye5D49Bl/WFkMlKb7VOu/BVeiSpWnT 8u0pQNh8GlqaxcIGt+6apl2lhQeB14Odk3MKg= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 8F1252840F; Thu, 1 Jul 2010 21:37:54 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 2FF58A1FC; Thu, 1 Jul 2010 21:37:44 -0400 (EDT) Date: Thu, 1 Jul 2010 21:37:43 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Andy Burgard cc: pgsql-jdbc@postgresql.org Subject: Re: a problem with getting correct info about table's privileges In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/11 X-Sequence-Number: 20676 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