Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHzLP-0004m0-WC for pgsql-sql@arkaria.postgresql.org; Mon, 05 Jun 2017 21:15:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dHzLO-0008FR-Cp for pgsql-sql@arkaria.postgresql.org; Mon, 05 Jun 2017 21:15:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHzLO-0008F4-0K for pgsql-sql@postgresql.org; Mon, 05 Jun 2017 21:15:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHzLL-0008EK-Ga for pgsql-sql@postgresql.org; Mon, 05 Jun 2017 21:15:21 +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 v55LFHdk000988; Mon, 5 Jun 2017 17:15:17 -0400 From: Tom Lane To: anand086 cc: pgsql-sql@postgresql.org Subject: Re: Delete failing with -- permission denied In-reply-to: <1496695493471-5964882.post@n3.nabble.com> References: <1496695493471-5964882.post@n3.nabble.com> Comments: In-reply-to anand086 message dated "Mon, 05 Jun 2017 13:44:53 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <986.1496697317.1@sss.pgh.pa.us> Date: Mon, 05 Jun 2017 17:15:17 -0400 Message-ID: <987.1496697317@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org anand086 writes: > Delete from table test.entities_all is failing with "permission denied for > relation". The table from which row has to be deleted, is referenced by > another table "attribute_types" with ON DELETE CASCADE. > I tried deleting the row from attribute_types table and then deleting from > test.entities_all succeed. Probably you have permissions to do such deletion, but the owner of the entities_all table does not. FK CASCADE queries are run as the owner of the table in question. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql