我有一个关于PostgreSQL中错误消息的问题。 我注意到,如果发生某些故障,PostgreSQL以文本消息的形式生成报告,但它不包含错误代码ID。 例如:配置PostgreSQL错误消息
ERROR: Relation "mytable" already exists or
ERROR: duplicate key value violates unique constraint "id"
能否请您提出一个方法,让PostgreSQL 包括本地错误代码ID为实例的消息如下:
42P07 ERROR: Relation "mytable" already exists or
23505 ERROR: duplicate key value violates unique constraint "id"
。
可能吗?
在此先感谢。
似乎已经跟进https://stackoverflow.com/q/45353684/398670 –