Kris Kiger wrote:
Here's my problem. I have user X calling a database function. The function inserts data into table Y. User X only has select access to this table. Is there some way to allow user X to call a function that does an insert for him/her without user X having to have write access to table Y? Is it possible to log in as another user inside of a function?

See: http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-createfunction.html

In particular, SECURITY DEFINER might be what you want.

HTH,

Joe




---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

Reply via email to