pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
functions and grants question
2+ messages / 2 participants
[nested] [flat]

* functions and grants question
@ 2003-05-21 22:35  Avi Schwartz <avi@CFFtechnologies.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Avi Schwartz @ 2003-05-21 22:35 UTC (permalink / raw)
  To: pgsql-odbc

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: functions and grants question
@ 2003-05-22 02:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Avi Schwartz <avi@CFFtechnologies.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2003-05-22 02:28 UTC (permalink / raw)
  To: Avi Schwartz <avi@CFFtechnologies.com>; +Cc: pgsql-odbc

Avi Schwartz <avi@CFFtechnologies.com> 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-05-22 02:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 22:35 functions and grants question Avi Schwartz <avi@CFFtechnologies.com>
2003-05-22 02:28 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox