3

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?

  • 4
    You can only do that if the applications comply and actually set the application name e.g. through set application_name =.... Then you can retrieve it using current_setting(): postgresql.org/docs/current/static/… – a_horse_with_no_name Oct 20 '15 at 14:23
  • @a_horse_with_no_name Can you make your comment an Answer so this Question can be closed? – Basil Bourque Jun 12 '17 at 17:48
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.