Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Execute permissions for stored functions


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: Paul Hart <paulhart(at)redchocolate(dot)ca>
  • Cc: pgsql-sql(at)postgresql(dot)org
  • Subject: Re: Execute permissions for stored functions
  • Date: Mon, 19 Jan 2004 00:40:33 -0500
  • Message-id: <20956.1074490833@sss.pgh.pa.us> <text/plain>

Paul Hart <paulhart(at)redchocolate(dot)ca> writes:
> In RDBMSs such as Oracle, stored PL/SQL functions run with the 
> permissions of the user that creates the function. Users who are given 
> EXECUTE privileges then call the function with the permissions of the 
> creator of the function.

Use "SECURITY DEFINER" to get this behavior in Postgres.

The SQL99 spec punts as to whether SECURITY DEFINER should be the
default or not, so unfortunately neither we nor Oracle can be said
to be wrong on this point...

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group