Kenny Carruthers <pgmail(at)kennyc(dot)com> writes:
> I have an application that uses libpq to communicate with a database.
> From inside my application, I would like to define a 'trigger' and specify a
> function that is in my application as the 'trigger func' parameter. (This is
> all in C) Is this even possible?
You can't run application-side C code in the backend, no.
I think all you really need here are some rules to fire NOTIFY events:
ON INSERT TO mytable DO NOTIFY mytable_event;
and then listen for "mytable_event" notifications.
regards, tom lane