functions and grants question
functions and grants question
От:
Avi Schwartz <avi@CFFtechnologies.com>
Дата:
In other databases, stored procedures run under the privilege of the stored procedure owner. Is it supposed to work the same in postgresql? I am the owner of the database, tables and functions. When I grant execute permission on a function to another user, that user gets permission denied errors on the tables the stored procedure is accessing. Any idea what I may be doing wrong? Thanks, Avi -- Avi Schwartz avi@CFFtechnologies.com
Re: functions and grants question
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Avi Schwartz writes: > In other databases, stored procedures run under the privilege of the > stored procedure owner. Is it supposed to work the same in postgresql? Only if you attach the SECURITY DEFINER option to the function. regards, tom lane