Claudio Rossi wrote:
Hello, I'm trying to write a trigger function which uses GRANT ROLE
statement. Scenario is: I have a group role (let's call it A) which
has not superuser privileges and I want to grant A membership to
current user after an insert on a particular table, then revoke it
after a delete on it; I write trigger function as superuser then I
normally login as unprivileged user.

I think you want to define your function as SECURITY DEFINER, then it'll do what you want.

This isn't a hackers question by the way, the hackers list is for developing PostgreSQL itself. This question is better suited to the general / sql / admin lists perhaps.

  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to