There are two applications that used the same function (trigger) in postgresql. I have to ignore notification by applicatonname. How do I identify the current program/application that called the function?
You can use
select current_setting('application_name'); but I've seen instances of client program (not written by me) not giving application name after a connection reset. You should also see comment from @a_horse_with_no_name above.