Re: execute permissions of stored procedures? - Mailing list pgsql-general

From Doug McNaught
Subject Re: execute permissions of stored procedures?
Date
Msg-id m31yfiirb5.fsf@varsoon.denali.to
Whole thread Raw
In response to execute permissions of stored procedures?  (eric@datalink.nl)
Responses Re: execute permissions of stored procedures?  (eric@datalink.nl)
List pgsql-general
eric@datalink.nl writes:

> In Solid it was possible to create a procedure (It looks like that a
> postgreSQL function is similar to that) and then to do a GRANT for
> EXECUTE rights on this procedure.  How can I do this in PostgrSQL?
>
> I want to use PostgreSQL as a database for our dynamic website, and
> the only thing I want to allow to the standard 'webuser' is to
> execute some procedures.  The use of a grant to a procedure allows
> me to be able to insert/update some specific rows in a database in a
> very specific way by a user that normally wouldn't even be allowed
> to do a SELECT on this table.

I think the only current way to do this is to create views and insert
rules for the views, and grant the web user access to the views rather
than the underlying table.  This *should* be doable, depending on what
you need to do in the rules.

Having 'setuid' functions has been talked about, but I don't think
it's currently there.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

pgsql-general by date:

Previous
From: eric@datalink.nl
Date:
Subject: execute permissions of stored procedures?
Next
From: Dave Page
Date:
Subject: Re: [HACKERS] Feature enhancement request : use of libg