Thread: execute permissions of stored procedures?

execute permissions of stored procedures?

From
Eric Veldhuyzen
Date:
Hi,

Right now I am evaluating PostgreSQL to see whether it can replace our current
databse server Solid (3.0). It looks like PostgreSQL has a lot of nice extra
features that I would love to use. But there is one thing that I simply can't
find anywhere.

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.

--
#!perl #                       Life ain't fair, but root passwords help.
# Eric Veldhuyzen                              eric@terra.telemediair.nl
$!=$;=$_+(++$_);($:,$~,$/,$^,$*,$@)=$!=~                   # Perl Monger
/.(.)...(.)(.)....(.)..(.)..(.)/;`$^$~$/$: $^$*$@$~ $_>&$;`

Attachment

Re: execute permissions of stored procedures?

From
Doug McNaught
Date:
Eric Veldhuyzen <eric@terra.telemediair.nl> writes:

> 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.

This seems to be a repeat of your previous message (perhaps there's a
mail loop somewhere) so I won't rehash the discussions we've had.
I'll just point out that SQL schemas and all that they imply are
coming in 7.3, so you may want to reevaluate PostgreSQL for your needs
at that point (it'll be a while though as 7.3 development has just
started).

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