From: Robert Treat <xzilla@users.sourceforge.net>
To: Josh Berkus <josh@agliodbs.com>
Cc: Luis Sousa <llsousa@ualg.pt>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Permission on insert rules
Date: 12 Nov 2002 16:40:15 -0500
Message-ID: <1037137215.27220.64.camel@camel> (raw)
In-Reply-To: <web-1822655@davinci.ethosmedia.com>
References: <web-1822655@davinci.ethosmedia.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: xzilla@users.sourceforge.net, josh@agliodbs.com, llsousa@ualg.pt
Subject: Re: Permission on insert rules
In-Reply-To: <1037137215.27220.64.camel@camel>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox