From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Luis Sousa <llsousa(at)ualg(dot)pt>, pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Permission on insert rules |
Date: | 2002-11-12 21:40:15 |
Message-ID: | 1037137215.27220.64.camel@camel |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)postgresql(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Luis Sousa | 2002-11-13 10:44:19 | Re: Permission on insert rules |
Previous Message | Martin Crundall | 2002-11-12 21:19:41 | Re: Postgres Date pg_dump/Import: |