Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EBBD4476182 for ; Tue, 12 Nov 2002 16:40:44 -0500 (EST) Received: from localhost.localdomain (unknown [65.217.53.66]) by postgresql.org (Postfix) with ESMTP id 5785647610B for ; Tue, 12 Nov 2002 16:40:44 -0500 (EST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by localhost.localdomain (8.12.5/8.12.5) with ESMTP id gACLi26P016894; Tue, 12 Nov 2002 16:44:03 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id gACLeFj29247; Tue, 12 Nov 2002 16:40:18 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id WK2G0ZXQ; Tue, 12 Nov 2002 16:40:15 -0500 Subject: Re: Permission on insert rules From: Robert Treat To: Josh Berkus Cc: Luis Sousa , pgsql-sql In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 12 Nov 2002 16:40:15 -0500 Message-Id: <1037137215.27220.64.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/202 X-Sequence-Number: 10344 This should be a test case for what Luis wants, although it works in 7.2.1 so maybe not. Luis, if this isn't what your trying to do, you'll need to post some code: create table parent (id int, name text, misc text); create view child as select id,name from parent; create rule jammasterjay as on insert to child do instead insert into parent values (new.id,new.name); insert into parent values (1,'one','wahad'); insert into parent values (2,'two','ithnain'); insert into parent values (3,'three','thalata'); select * from parent; select * from child; insert into child (4,'four'); select * from parent; create user mellymel; grant select on child to mellymel; grant insert on child to mellymel; ** reconnect as mellymel ** select * from parent; (generates error) select * from child; insert into child values (5,'five'); select * from child; (has all 5 rows) Robert Treat On Tue, 2002-11-12 at 12:29, Josh Berkus wrote: > Luis, > > > That's what I already made. The problem is when I do the update, I > > permission denied in all the tables for update and insert. The user > > that's making this operation only have select privilege. > > Any way, I'm using version 7.2.1-2 for debian. > > I can't reproduce the problem, and permissions did not get fixed > between 7.2.1 and 7.2.3. So I'm pretty sure that you're missing > something, somewhere. > > Please post: > > 1) The table definitions for the tables being updated. > 2) The view definition and permissions > 3) The Rules statements defined on the view > 4) A copy of your database session where your update is denied, > including the exact error message received. > > Without that information, no futher help is available. > > -Josh Berkus > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org