X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 41804B439CF for ; Tue, 8 Jul 2003 16:36:58 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 52411-03 for ; Tue, 8 Jul 2003 13:36:47 -0300 (ADT) Received: from sfpop.smtp.stsn.com (p32.n-sfpop03.stsn.com [199.107.154.32]) by svr1.postgresql.org (Postfix) with ESMTP id AC737B439FE for ; Tue, 8 Jul 2003 13:36:46 -0300 (ADT) Received: from joeconway.com ([10.4.203.84]) by sfpop.smtp.stsn.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 7 Jul 2003 09:40:31 -0700 Message-ID: <3F0AF29F.4050501@joeconway.com> Date: Tue, 08 Jul 2003 09:34:39 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Luis Sousa Cc: pgsql-sql Subject: Re: Setuid functions References: <3F0AF186.2010107@ualg.pt> In-Reply-To: <3F0AF186.2010107@ualg.pt> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Jul 2003 16:40:31.0609 (UTC) FILETIME=[7B0B1690:01C344A6] X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/85 X-Sequence-Number: 14199 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