We recently retired DB2 UDB on Linux and selected EnterpriseDB (postgres w/add-ons to make it look more like Oracle). Anyway, being an MS Sql/Sybase dweeb myself, I've got a question on how to do something in postgresql/enterprisedb. In previous efforts, I've written ins_Table(), upd_Table(), del_Table() and, on occasion, have written sp's to return cursors to clients and in each case the user had execute permissions on the stored procedures, but not on the base tables.

What's the best way to accomplish this same functionality in postgresql? I've been told by EnterpriseDB that if a function returns a cursor, and a user has execute permissions on the function, the user *must* also have select permissions on any of the tables select'ed from in the function. I'm waiting to hear of the same applies to ins/upd/del - which would suck for us.