Functions as a Security Layer - Mailing list pgsql-general

From Benjamin Stookey
Subject Functions as a Security Layer
Date
Msg-id 20060109034324.86964.qmail@web35013.mail.mud.yahoo.com
Whole thread Raw
Responses Re: Functions as a Security Layer  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Functions as a Security Layer  (Shelby Cain <alyandon@yahoo.com>)
List pgsql-general
Functions, with some databases, are used as security
layers so that a user that wouldn't otherwise have
read/write privileges on a table can perform some sort
of controlled update.

I've written a function to serve as a type of counter
to update a table called "users". This function takes
one (relevant) parameter: userID. This then updates
the counter with that user's id. However, I am getting
a permissions error because the users who run the
function don't have write access to the counter table.

My question is, can I somehow give permissions to the
function, but not to the user to protect the counter
table from being modified in any ways I don't want?

Thanks,
-Ben



__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com


pgsql-general by date:

Previous
From: Postgres User
Date:
Subject: Re: Installing Postgres 8.1 on Windows Server 2003 R2
Next
From: Tom Lane
Date:
Subject: Re: Functions as a Security Layer