pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul Hart <paulhart@redchocolate.ca>
Cc: pgsql-sql@postgresql.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> (raw)
In-Reply-To: <61572386-4A2B-11D8-8678-000393CC268A@redchocolate.ca>
References: <61572386-4A2B-11D8-8678-000393CC268A@redchocolate.ca>

Paul Hart <paulhart@redchocolate.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



view thread (2+ messages)

Message-ID: <20956.1074490833@sss.pgh.pa.us>
Permalink:  ../20956.1074490833@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20956.1074490833@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, paulhart@redchocolate.ca
  Subject: Re: Execute permissions for stored functions
  In-Reply-To: <20956.1074490833@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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