Re: Error message inconsistency - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Error message inconsistency
Date
Msg-id 20200122133249.GA9513@alvherre.pgsql
Whole thread Raw
In response to Re: Error message inconsistency  (MBeena Emerson <mbeena.emerson@gmail.com>)
Responses Re: Error message inconsistency  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: We're getting close to the end of 2020-01 CF
Next
From: Tomas Vondra
Date:
Subject: Re: We're getting close to the end of 2020-01 CF