Re: execute permissions of stored procedures? - Mailing list pgsql-general

From Helge Bahmann
Subject Re: execute permissions of stored procedures?
Date
Msg-id Pine.LNX.4.21.0202201833520.18297-100000@lothlorien.stunet2.tu-freiberg.de
Whole thread Raw
In response to Re: execute permissions of stored procedures?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On a somewhat related issue: I wonder whether the current interaction
of rules and functions (especially trigger functions, but functions
used in CHECK constraints are affected as well) is really fortunate:
Suppose a query executed by user 'A' gets rewritten and the resulting
query executed with the privileges of user 'B' -- all functions
are still invoked with the privileges of user 'A'. Is this intentional?
I remember having to grant additional rights to user 'A' in some cases,
just to please some trigger procedures.

Wouldn't it be more useful to make a complete privilege transition to
user 'B' when rewriting the query? Honestly I cannot think of a case
where this would not be the desired behaviour (at least I think this is
the expected behaviour), perhaps someone can give a counter-example why
the current behaviour would be more correct?

Best regards
--
Helge Bahmann <bahmann@math.tu-freiberg.de>             /| \__
Network admin, systems programmer                      /_|____\
                                                     _/\ |   __)
$ ./configure                                        \\ \|__/__|
checking whether build environment is sane... yes     \\/___/ |
checking for AIX... no (we already did this)            |


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: execute permissions of stored procedures?
Next
From: Chris Bowlby
Date:
Subject: Error...