[GENERAL] Triggers after a rule

2005-09-28 Thread Wijnand Wiersma
Hi list, I am currently trying to give normal users some read access to some tables in the database. I also need to give update access to one column of one table. I have the table contact, the user should not be able to read or update anything in it, except for his own record. So I created the vi

Re: [GENERAL] Triggers after a rule

2005-09-28 Thread Wijnand Wiersma
2005/9/28, Richard Huxton : > Wijnand Wiersma wrote: > > I thought that when a rule is applied the triggers which are triggerd > > would also have the same userid as the rule query, but I was wrong. > > Can you show the (cut down) contents of your trigger? It's difficult

Re: [GENERAL] Triggers after a rule

2005-09-28 Thread Wijnand Wiersma
2005/9/28, Richard Huxton : > The solution is to mark your trigger functions with the "SECURITY > DEFINER" attribute and create them as a user who can access relation > "contact". > http://www.postgresql.org/docs/8.0/static/sql-createfunction.html Damn, I really really missed that one :-( Thank yo