我有一個關於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 –