dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

Re: [GENERAL] Delete cascade trigger runs security definer - postgresql

This is a discussion on Re: [GENERAL] Delete cascade trigger runs security definer - postgresql ; Dean Rasheed writes: > I have a table with a trigger on it, designed to run security > invoker. In my real code this accesses a temporary table belonging to > the invoker. > Then I have second table, together ...


Home > Database Forum > Other Databases > postgresql > Re: [GENERAL] Delete cascade trigger runs security definer

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 11-14-2008, 11:56 AM
Database Bot
 
Join Date: Sep 2009
Posts: 1,236,254
Database Administrator is on a distinguished road
Default Re: [GENERAL] Delete cascade trigger runs security definer

Dean Rasheed writes:
> I have a table with a trigger on it, designed to run security
> invoker. In my real code this accesses a temporary table belonging to
> the invoker.


> Then I have second table, together with a foreign key between them and
> a delete cascade from the second to the first table. It appears that
> when I delete from this second table, the deletes cascade as expected,
> but the trigger is invoked as if it were security definer, which I
> didn't expect.


Referential integrity actions execute as the owner of the table, so
anything triggered by them would execute as the owner too.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 05:38 PM.