如何将文本 postgres 错误消息转换为错误代码?
例如:
permission denied for relation table
如何在此处找出它属于哪个错误代码?https://www.postgresql.org/docs/current/static/errcodes-appendix.html
检查您的log_line_prefix
设置postgresql.conf
。确保使用此%e
选项在 postgres 日志中记录代码。
%e
= SQL 状态
您还可以使用\set VERBOSITY verbose
inpsql
查看SQLSTATE
那里的详细错误。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句