Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eALLGVs25838 for ; Tue, 21 Nov 2000 16:16:31 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id eALLEIw02956; Tue, 21 Nov 2000 16:14:18 -0500 (EST) To: Brian Powell cc: pgsql-sql@postgresql.org Subject: Re: Permissions Broken in 7.0.x? In-reply-to: References: Comments: In-reply-to Brian Powell message dated "Tue, 21 Nov 2000 13:17:17 -0700" Date: Tue, 21 Nov 2000 16:14:18 -0500 Message-ID: <2953.974841258@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200011/178 X-Sequence-Number: 209 Brian Powell writes: > % psql bobdb > psql => create table test ( > name char(32) not null, > age int4 > ); > psql => revoke all on test from tester; > CHANGE > psql => select * from test; > ERROR: test: Permission denied. Yeah, that's a bug --- confusion about the default permissions set. After doing an explicit GRANT or REVOKE on a table you own, you need to grant permissions to yourself again; the default assumption that you have all permissions gets lost :-(. This is fixed for 7.1. > Additionally, if I have a trigger on a table which sets the updated_date and > updated_by on any update, and I have a view with a rule which passes any > update to the table (thus calling the trigger), I get a permission denied. > I am supposing that the user updating the view does not have privileges to > the trigger? How would I grant them privileges to the trigger? Don't think there's a way to do that right now. There's been talk of making triggers run "setuid" to the creating user, but it's not been done AFAIR. regards, tom lane