X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 101699FA5E1 for ; Wed, 31 May 2006 13:21:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 70381-06 for ; Wed, 31 May 2006 13:21:42 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web54204.mail.yahoo.com (web54204.mail.yahoo.com [206.190.39.246]) by postgresql.org (Postfix) with SMTP id 05E009FA5E9 for ; Wed, 31 May 2006 13:21:41 -0300 (ADT) Received: (qmail 55265 invoked by uid 60001); 31 May 2006 16:21:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kD5F/fxCV+XJQRar1wHxF/AWalyjdcwigfo6tzVdKG2p6oCE2n8TwelYROYlLd25dfsE+RZJMuupXCHpOmLbteKUG77LZTj8TymxU5sHSqRd7BSqX7cZIiPJ0zssyIjlr1Nl+CsohWvJ++5cWeAhGxhWEcaoMvLASI1RbSvAwn4= ; Message-ID: <20060531162140.55263.qmail@web54204.mail.yahoo.com> Received: from [64.81.86.61] by web54204.mail.yahoo.com via HTTP; Wed, 31 May 2006 09:21:40 PDT Date: Wed, 31 May 2006 09:21:40 -0700 (PDT) From: "J." Subject: granted select works in psql but not via jdbc To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1834641100-1149092500=:55153" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/147 X-Sequence-Number: 15275 --0-1834641100-1149092500=:55153 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I'm trying to set up a system where users will be limited based on their access. To do this I'm querying db_roles and if an exception is thrown, they're not a db admin. The problem is that I've done this: grant select on pg_roles to db_mid_level_admin; then any member of the role db_mid_level_admin can query db_roles using psql, but when I try it in jdbc it throws an exception (permission denied for relation pg_roles). Same user, different behavior in psql vs jdbc. I can't make this admin level superuser because then they'd have access to some stuff they shouldn't. Thanks. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1834641100-1149092500=:55153 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I'm trying to set up a system where users will be limited based on their access.  To do this I'm querying db_roles and if an exception is thrown, they're not a db admin.  The problem is that I've done this:

grant select on pg_roles to db_mid_level_admin;

then any member of the role db_mid_level_admin can query db_roles using psql, but when I try it in jdbc it throws an exception (permission denied for relation pg_roles).

Same user, different behavior in psql vs jdbc.  I can't make this admin level superuser because then they'd have access to some stuff they shouldn't.  Thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com --0-1834641100-1149092500=:55153--