0

I would like to know if it is possible to have a trigger when a user is added to or drop from a group ? Does this trigger could also works when directly create a user in a group (create role ... in group ...) ?
(In fact, I want some users of a specified group to have a specific search_path, so I can set/reset the search_path in the trigger).

ekad
  • 14,436
  • 26
  • 44
  • 46
Philippe Gonday
  • 1,747
  • 5
  • 21
  • 32

1 Answers1

2

No, PostgreSQL doesn't support DDL-triggers, only on INSERT, UPDATE, DELETE, or TRUNCATE events. Maybe in version 9.1, but that will be 2011 or even 2012 or later.

http://www.postgresql.org/docs/current/interactive/sql-createtrigger.html

Frank Heikens
  • 117,544
  • 24
  • 142
  • 135