From: J. <sweepingoar@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: granted select works in psql but not via jdbc
Date: Thu, 1 Jun 2006 00:10:08 -0700 (PDT)
Message-ID: <20060601071008.47601.qmail@web54206.mail.yahoo.com> (raw)
In-Reply-To: <20060531234220.GC1436@timbira.com>
db_roles doesn't seem to exist as a table. A lot of tables seem to start with "pg_" if they deal with roles and privileges.
I was able to solve the problem by creating dummy tables that had very specific privileges and catching exceptions to determine what group the user belonged to so I could display the appropriate options. I got the grade on the assignment, but I still don't get why a user could select from pg_roles from the psql prompt, but not via jdbc statements.
Euler Taveira de Oliveira <euler@timbira.com> wrote: J. wrote:
> 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;
^^^^^^^^^
Wouldn't it be db_roles?
--
Euler Taveira de Oliveira
http://www.timbira.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
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: sweepingoar@yahoo.com
Subject: Re: granted select works in psql but not via jdbc
In-Reply-To: <20060601071008.47601.qmail@web54206.mail.yahoo.com>
References: <20060531234220.GC1436@timbira.com> <20060601071008.47601.qmail@web54206.mail.yahoo.com>
* 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