Because I found with surprise that DataGrip shows irregular version of trigger function’s source code and pgAdmin 4 somehow refuses to show it at all (claiming internal server error) I had to find some other way how to access it.

Solution is described here “How can I show the content of a trigger with psql?“:

  1. in psql:
    • \dft – shows all trigger functions names
    • \dS <tablename> – shows names of triggers on given table
    • \df+ <functionname> – shows source code of trigger function
  2. select pg_get_functiondef('functionname'::regproc);