No select permission on a table but can query it

From: Michele Petrazzo - Unipex srl <michele(dot)petrazzo(at)unipex(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: No select permission on a table but can query it
Date: 2008-10-15 19:33:26
Message-ID: 48F64586.50407@unipex.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think that this is a strange question, but: I need to revoke the
select permission on a table, but I also need to leave, with a function,
a user do a query on column.
A real case can be that a user "test" cannot have the permissions for do
a "select * from articles", but for do a "select has_article('an_article')"
where has_article are:

FUNCTION has_article (text) RETURNS articles AS $$
SELECT * from articles WHERE id_article=$1;
$$ LANGUAGE SQL

Into my tries I receive always a
ERROR: permission denied for relation articles

It's there a solution?

Thanks,
Michele

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma 2008-10-15 19:42:00 Re: Numbering rows
Previous Message Scott Marlowe 2008-10-15 19:32:57 Re: Numbering rows