pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Luis Sousa <llsousa@ualg.pt>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Setuid functions
Date: Tue, 08 Jul 2003 09:34:39 -0700
Message-ID: <3F0AF29F.4050501@joeconway.com> (raw)
In-Reply-To: <3F0AF186.2010107@ualg.pt>
References: <3F0AF186.2010107@ualg.pt>

Luis Sousa wrote:
> How can I set a function as setuid ?
> I take a look at the documetation, on Reference Manual and the only 
> reference I saw to it was on SET SESSION AUTHORIZATION.

See:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-createfunction.html

CREATE [ OR REPLACE ] FUNCTION name ( [ argtype [, ...] ] )
      RETURNS rettype
    { LANGUAGE langname
      | IMMUTABLE | STABLE | VOLATILE
      | CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
      | [EXTERNAL] SECURITY INVOKER | [EXTERNAL] SECURITY DEFINER
      | AS 'definition'
      | AS 'obj_file', 'link_symbol'
    } ...
      [ WITH ( attribute [, ...] ) ]


[EXTERNAL] SECURITY INVOKER
[EXTERNAL] SECURITY DEFINER

     SECURITY INVOKER indicates that the function is to be executed with 
the privileges of the user that calls it. That is the default. SECURITY 
DEFINER specifies that the function is to be executed with the 
privileges of the user that created it.

     The key word EXTERNAL is present for SQL compatibility but is 
optional since, unlike in SQL, this feature does not only apply to 
external functions.

HTH,

Joe




view thread (2+ messages)

Message-ID: <3F0AF29F.4050501@joeconway.com>
Permalink:  ../3F0AF29F.4050501@joeconway.com/
Also on:    postgresql.org/message-id/3F0AF29F.4050501@joeconway.com

 · 

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: mail@joeconway.com, llsousa@ualg.pt
  Subject: Re: Setuid functions
  In-Reply-To: <3F0AF29F.4050501@joeconway.com>

* 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