Reputation: 21
I have a question concerning the error messages in PostgreSQL. I noticed that in case of some failure PostgreSQL make a report in the form of text message but it does not contain error code id. For instance:
ERROR: Relation "mytable" already exists or
ERROR: duplicate key value violates unique constraint "id"
Could you please suggest a way to make PostgreSQL including native error code id to messages for instance as follows:
42P07 ERROR: Relation "mytable" already exists or
23505 ERROR: duplicate key value violates unique constraint "id"
.
Is it possible ?
Thanks in advance.
Upvotes: 0
Views: 306
Reputation: 1081
You can change the parameter log_error_verbosity
in postgresql.conf
file to change the amount of information being logged during errors. By default, its value is default. You can change it to verbose to include more information about the errors.
Upvotes: 2