Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvysg-0008G2-ER for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Apr 2017 04:18:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cvysg-0004k7-0d for pgsql-bugs@arkaria.postgresql.org; Thu, 06 Apr 2017 04:18:46 +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 1cvy9b-0002yk-TR for pgsql-bugs@postgresql.org; Thu, 06 Apr 2017 03:32:12 +0000 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cvy9Z-00045r-32 for pgsql-bugs@postgresql.org; Thu, 06 Apr 2017 03:32:10 +0000 Received: by mail-pg0-x22e.google.com with SMTP id g2so22720846pge.3 for ; Wed, 05 Apr 2017 20:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=PfklbTX0YiUT4VB48VRPGmIHwt7D4Llt4W3OihNeqk8=; b=a1Jb8EMeBCgoXQVYw3dG5GCi954YReA+GddVZIBz5ZK/BrAimSngtxJSsxX6ypjLED 6y6jP4AKEyhQ2mDWypOljGNbaks5+qOmIhWO5gABCPiMY5h9HzB6hEdaoyJTYTkKDA3E 2OfdaOGLkLdChrewPSNvlgaBrM3Y6yrcnBx0iBgLjEGTkH7CBh7lYT7L3ToC9Uu5yutf O6AH74tmeDW74dLWeQkbfUisOnMy23HWh37EublRMhKgwAZ9rqd7voTVT8Bd3DlMkvyS ej4aHLDFfMYTj4+hRJvqlWE2vGCEiGZkYrT4B7YH3/6JOgcJixk2gk5tRwUtGCybt9si kgxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=PfklbTX0YiUT4VB48VRPGmIHwt7D4Llt4W3OihNeqk8=; b=aPmoaL1iO60RHhLrmeGJ53beXz85KbciiFbF2LLPqzvNeTC3fAI32t4fHzs7C1rgjh DCjD9kp1wqUEW0k4Hex2aCJPeS5JUZvpaxnMd9jrZD65xZjYm01D6Ov5a6ejRSm/qHMb 7bf7MPL6YGCqknwvy6nTKnwFBeenbtZ5ObEonQnYBSBFvez9xMcT7n38WqPujdXQ2GVz 2bcAacinOOq7daM2TptSZj1Ln+Bf5qLGZVFgLYsLfWPT1R12fAnMSyKSI6cnlzPDplHi EWm0xAygjRjPKkUR1Xk16F1ipsLJu0sC63RLM2lpCaM/dseiXpMcy2NWcgPYq1YvAqIt I+dQ== X-Gm-Message-State: AFeK/H3bV/3OMi9ZuV4Ryhdveqx3ulkGAhsE/etThDtogcAwiNeiSNLKF8g/6ezIIL7GVg== X-Received: by 10.84.210.132 with SMTP id a4mr806500pli.40.1491449527773; Wed, 05 Apr 2017 20:32:07 -0700 (PDT) Received: from owly.local (119-228-31-162f1.kyt1.eonet.ne.jp. [119.228.31.162]) by smtp.gmail.com with ESMTPSA id l9sm361078pfi.97.2017.04.05.20.32.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 20:32:07 -0700 (PDT) Subject: Re: BUG #14613: Referencing foreign key needs privileges of table owner? To: Tom Lane References: <20170406020941.25934.30410@wrigleys.postgresql.org> <14343.1491447636@sss.pgh.pa.us> Cc: pgsql-bugs@postgresql.org From: Hisahiro Kauchi Message-ID: <70a46d27-8ae3-c0bb-5645-a2e070dfcc81@gmail.com> Date: Thu, 6 Apr 2017 12:32:05 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <14343.1491447636@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) 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 On 2017/04/06 12:00, Tom Lane wrote: >> revoke all on schema public from public; // To prevent creation of >> objects. > > You realize that that's much more draconian than needed to prevent > creation of objects? In particular, you've left user1 unable to > reference the table it owns, which hardly seems like a useful > arrangement. Yes, I had done too much... :( But I thought user2 had enough permissions, so I asked a question. > This is not a bug. That foreign key check query is executed as the owner > of table1. If it were not, you'd probably be complaining about some > other permissions problem. I understood. Thanks! -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs