Re: Delete failing with -- permission denied

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: anand086 <anand086(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Delete failing with -- permission denied
Date: 2017-06-05 21:15:17
Message-ID: 987.1496697317@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

anand086 <anand086(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message anand086 2017-06-05 21:34:37 Re: Delete failing with -- permission denied
Previous Message anand086 2017-06-05 20:44:53 Delete failing with -- permission denied