How to get the statement that triggered a trigger function when it is called as part of multi-statement query or function in PL/pgSQL?
I have an INSTEAD OF INSERT
trigger on a view. Its trigger function calls current_query()
. When inserting something directly into this view, everything works fine.