Re: updateble views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: thiemo <thiemo(at)gmx(dot)ch>
Cc: pgNovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: updateble views
Date: 2002-04-19 23:31:40
Message-ID: 15792.1019259100@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

thiemo <thiemo(at)gmx(dot)ch> writes:
> I have a table that I want users to access to only through a view. For=20
> the inserts, I have defined a rule. I granted insert rights on the base=20
> table and view as well as select rights on the view to the users.=20
> However, a users trying an insert on the view gets an "Error while=20
> executing statement: ERROR: s_pwd.nextval: you don't have permissions=20
> to set sequence s_pwd". Is there a right I need to grant to the users=20
> regarding the sequence?

Unfortunately, you'll have to give 'em update rights on the sequence.

This should be checked against the rule owner's permissions, not the
rule user's permissions, but nextval() has no idea it's being executed
as the result of rule expansion rather than something the user typed
directly :-(

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message sophie yang 2002-04-20 01:59:50 Re: algebraic rewriting
Previous Message Josh Berkus 2002-04-19 23:26:23 Re: updateble views