0

psql現在、エラーが発生した場合、 Python モジュールをインポートしてそこから関数を呼び出す PL/Python プロシージャのトレースバックがあります。

ERROR:  AssertionError: 
CONTEXT:  Traceback (most recent call last):
  PL/Python function "tempo_timeintervalset_contains", line 6, in <module>
    TimeIntervalSet.from_json(timeintervalset))
  PL/Python function "tempo_timeintervalset_contains", line 209, in __contains__
  PL/Python function "tempo_timeintervalset_contains", line 106, in _walk
  PL/Python function "tempo_timeintervalset_contains", line 41, in _evaluate
  PL/Python function "tempo_timeintervalset_contains", line 200, in callback
  PL/Python function "tempo_timeintervalset_contains", line 91, in __contains__
PL/Python function "tempo_timeintervalset_contains"

この環境変数を設定log_error_verbosity = verboseして設定しようとしました。何も助けませんでした。postgresql.confPYTHONVERBOSE=1 PYTHONDEBUG=1

可能であれば、実際にそれをより詳細に設定する方法を誰が知っていますか?

4

1 に答える 1

0

これが古いことは知っていますが、これはうまく機能します。

create function python_version()
returns text
language plpythonu
as $$

import sys
import traceback

try:
    return sys.version
except:
    error = sys.exc_info()[0]
    details = traceback.format_exc()
    plpy.error('%s: %s' % ( error, details ) )
$$;
于 2016-09-23T16:34:09.243 に答える