Postgresql 9.4: How to find out the stack level of nested function
There's a different, simpler, solution for this. Add an argument to function fA with a default value, for instance: called_from_b BOOLEAN DEFAULT FALSE. Then, provide that argument when calling fA from fB.

I understand that this doesn't directly answer your question, but it does provide a solution for the example usecase that you provide.