Re: Error message inconsistency
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: MBeena Emerson <mbeena.emerson@gmail.com>
Cc: Mahendra Singh Thalor <mahi6run@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Simon Riggs <simon@2ndquadrant.com>, Fabrízio Mello <fabriziomello@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-01-22T13:32:49Z
Lists: pgsql-hackers
I wonder if we shouldn't be using errtablecol() here instead of (in addition to?) patching the errmsg() to include the table name. Discussion: If we really like having the table names in errtable(), then we should have psql display it by default, and other tools will follow suit; in that case we should remove the table name from error messages, or at least not add it to even more messages. If we instead think that errtable() is there just for programmatically knowing the affected table, then we should add the table name to all errmsg() where relevant, as in the patch under discussion. What do others think? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Added relation name in error messages for constraint checks.
- 05f18c6b6b6e 13.0 landed