Postgres 错误代码

突出的

如何将文本 postgres 错误消息转换为错误代码?

例如:

permission denied for relation table

如何在此处找出它属于哪个错误代码?https://www.postgresql.org/docs/current/static/errcodes-appendix.html

postgresdba

检查您的log_line_prefix设置postgresql.conf确保使用此%e选项在 postgres 日志中记录代码。

%e = SQL 状态

您还可以使用\set VERBOSITY verboseinpsql查看SQLSTATE那里的详细错误

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章