Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAhxG-0000xd-P7 for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Nov 2017 19:48:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eAhxG-0006bi-7R for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Nov 2017 19:48:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eAhwY-0005LK-BF for pgsql-bugs@postgresql.org; Fri, 03 Nov 2017 19:47:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eAhwV-0004zm-PG for pgsql-bugs@postgresql.org; Fri, 03 Nov 2017 19:47:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vA3JloxW012119; Fri, 3 Nov 2017 15:47:50 -0400 From: Tom Lane To: Jeff Janes cc: Pg Bugs Subject: Re: permissions denial to superuser with foreign keys In-reply-to: References: Comments: In-reply-to Jeff Janes message dated "Fri, 03 Nov 2017 12:42:42 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12117.1509738470.1@sss.pgh.pa.us> Date: Fri, 03 Nov 2017 15:47:50 -0400 Message-ID: <12118.1509738470@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Jeff Janes writes: > I thought superusers bypassed permissions checks, but was surprised where > in this case they do not: This amounts to asking for superuser permissions to propagate into SECURITY DEFINER functions called by the superuser, which strikes me as an utterly horrid idea. (RI triggers aren't actually implemented with the SECURITY DEFINER mechanism, but they act like they are.) regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs