Kris Kiger <[EMAIL PROTECTED]> writes: > 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?
In recent releases you can mark a function as SECURITY DEFINER, which is like setting the setuid bit on a Unix program --- it will run as the owner of the function, rather than as the caller. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster