For triggers, use TG_NAME to get the name of the trigger (rather than the trigger function).
You also have current_query() to get the top-level query executed by the application, which is the main reason for executing your function. It will not show you any intermediate functions.
Otherwise, indeed, AFAIK and I really looked for it some time ago, when I wanted to print the "current function stack" for debugging. Others may know more.
UPDATE: in Pg 9.4 and later, you can also use PG_CONTEXT for the call stack, but not just for the current function name.
Craig Ringer
source share