There doesn't appear to be a 'transaction timeout' mechanism for the
transaction that wraps a PL/pgSQL function. So if the code hangs, it
would appear that the transaction will as well unless statement_timeout
is set.
Is there a better way to prevent a transaction hang without globally
limiting a statement timeout?