On Wed, Sep 30, 2015 at 3:02 AM, =E5=BE=B7=E5=93=A5 <digoal@126.com> wrote:
> HI,
> If we can change the function's security dynamical, like :
> When function trigged in trigger or rule, force these function's
> security =3D table,mview,view's owner.
> There will no risks in the case.
>
> PS: MySQL do that.
>
=E2=80=8BIOW: "=E2=80=8B
Relations that are used due to rules get checked against the privileges of
the rule owner, not the user invoking the rule
=E2=80=8B." should apply to functions as well.
=E2=80=8Bhttp://www.postgresql.org/docs/9.4/static/rules-privileges.html
I would agree and thought they did but your most example does seem to
indicate otherwise...
David J.