Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 58D70B5DBC8 for ; Fri, 24 Jun 2011 12:25:53 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 67641-01 for ; Fri, 24 Jun 2011 15:25:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DDC45B5DC41 for ; Fri, 24 Jun 2011 12:25:46 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p5OFPgvx026126; Fri, 24 Jun 2011 11:25:42 -0400 (EDT) To: "Dave Fennell" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6076: Unexpected "Security Definer / invoker" interaction In-reply-to: <201106241448.p5OEmekP044181@wwwmaster.postgresql.org> References: <201106241448.p5OEmekP044181@wwwmaster.postgresql.org> Comments: In-reply-to "Dave Fennell" message dated "Fri, 24 Jun 2011 14:48:40 +0000" Date: Fri, 24 Jun 2011 11:25:42 -0400 Message-ID: <26125.1308929142@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/200 X-Sequence-Number: 30579 "Dave Fennell" writes: > I would expect that if a function defined as "security definer" calls a > function defined as "security invoker" the "invoker" role used would be the > "definer" of the first function? So would I. > However it appears that the *actual* > invoker (current user) is used. You did not provide any evidence of that. Please show a *complete* self-contained test case. regards, tom lane