RE: [INTERFACES] A question on triggers - Mailing list pgsql-interfaces

From Hiroshi Inoue
Subject RE: [INTERFACES] A question on triggers
Date
Msg-id NDBBIJLOILGIKBGDINDFMENLCCAA.Inoue@tpf.co.jp
Whole thread Raw
In response to Re: [INTERFACES] A question on triggers  (Constantin Teodorescu <teo@flex.ro>)
List pgsql-interfaces
> -----Original Message-----
> From: owner-pgsql-interfaces@postgreSQL.org 
> [mailto:owner-pgsql-interfaces@postgreSQL.org]On Behalf Of 
> Constantin Teodorescu
> 
> Tom Lane wrote:
> > 
> > > But wouldn't be nice if PostgreSQL could offer a more elegant 
> solution?
> > 
> > Can't you do it with the normal GRANT/REVOKE access-control mechanism?
> 
> No. It didn't worked, that was my first idea!
> 
> > I'm pretty sure that for rules (views), the access rights for queries
> > issued within the rule are checked based on the owner of the rule, not
> > the user who invoked the rule.  Triggers ought to work the same way,
> > though I haven't tried it.  So you could make the trigger function and
> > the protected table owned by the same user, and then not grant write
> > permission on that table to anyone else.
> 
> It seems it didn't work!
>

Hmm,it seems to work for views(rules) but it doesn't work for functions.
It should work for stored procedures,shouldn't it ?

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp


pgsql-interfaces by date:

Previous
From: "Martin Kresse"
Date:
Subject: RE: [INTERFACES] NOTIFY/LISTEN with JDBC
Next
From: Dave Del Signore
Date:
Subject: JDBC - Numeric & Decimal handling in 6.5.3?