Re: DELETE CASCADE - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: DELETE CASCADE
Date
Msg-id c5592dce-3a5a-4285-7889-f3534d9d794c@enterprisedb.com
Whole thread Raw
In response to Re: DELETE CASCADE  (David Christensen <david.christensen@crunchydata.com>)
Responses Re: DELETE CASCADE
List pgsql-hackers
On 05.06.21 14:25, David Christensen wrote:
> 
>> On Jun 5, 2021, at 2:29 AM, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
>>
>> On 04.06.21 22:24, David Christensen wrote:
>>> So what are the necessary and sufficient conditions to check at this point?  The constraint already exists, so what
permissionswould we need to check against which table(s) in order to grant this action?
 
>>
>> I think you would need DELETE privilege on all affected tables.
> 
> So basically where we are dispatching to the CASCADE guts, first check session user’s DELETE permission and throw the
normalpermissions error if they can’t delete?
 

Actually, you also need appropriate SELECT permissions that correspond 
to the WHERE clause of the DELETE statement.



pgsql-hackers by date:

Previous
From: Tatsuro Yamada
Date:
Subject: Re: Duplicate history file?
Next
From: Greg Nancarrow
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions