Thread: trigger for pg_authid

trigger for pg_authid

From
"Diego de Blas"
Date:
Hello,
 
I'm trying to set a new trigger for "pg_authid" connected as "postgres" but system returns always the same error "Permission denied: "pg_authid" is a system catalog"... I have checked privileges and I can teorically add new triggers. I don't know whta's wrong...
 
Thanks

Re: trigger for pg_authid

From
Andreas Kretschmer
Date:
Diego de Blas <diego.deblasm@gmail.com> schrieb:

> Hello,
>
> I'm trying to set a new trigger for "pg_authid" connected as "postgres" but
> system returns always the same error "Permission denied: "pg_authid" is a
> system catalog"... I have checked privileges and I can teorically add new
> triggers. I don't know whta's wrong...

You can't create a TRIGGER on a system-table.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

Re: trigger for pg_authid

From
Kenneth Downs
Date:
Diego de Blas wrote:
> Hello,
>
> I'm trying to set a new trigger for "pg_authid" connected as
> "postgres" but system returns always the same error "Permission
> denied: "pg_authid" is a system catalog"... I have checked privileges
> and I can teorically add new triggers. I don't know whta's wrong...
>
> Thanks

We went the other way with this.  We created our own table of users, and
put a trigger on that so that INSERTS to that table created new users in
postgres, plus anything else we needed to happen.  We did the same with
a table of user-group membership.

Attachment