Re: Error message inconsistency - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Error message inconsistency
Date
Msg-id CAA4eK1KTdFmPQwJcE_mJjOSAoix_Kmv25D8xm_NTze=R8qHg8Q@mail.gmail.com
Whole thread Raw
In response to Re: Error message inconsistency  (Mahendra Singh Thalor <mahi6run@gmail.com>)
Responses Re: Error message inconsistency  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Error message inconsistency  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Jan 23, 2020 at 5:51 PM Mahendra Singh Thalor
<mahi6run@gmail.com> wrote:
>
> I fixed above comment and updated expected .out files. Attaching
> updated patches.
>

LGTM.  I have combined them into the single patch.  What do we think
about backpatching this?  As there are quite a few changes in the
regression tests, so it might be a good idea to keep the back branches
code in sync, but, OTOH, this is more of a change related to providing
more information, so we don't have any pressing need to backpatch
this.  What do others think?

One thing to note is that there are places in code where we use
'table' instead of 'relation' for the same thing in the error messages
as seen in the below places (the first one uses 'relation', the second
one uses 'table') and the patch is using 'relation' which I think is
fine.

1. src/backend/executor/execPartition.c
342             ereport(ERROR,
 343                     (errcode(ERRCODE_CHECK_VIOLATION),
 344                      errmsg("no partition of relation \"%s\"
found for row",
 345                             RelationGetRelationName(rel)),
 346                      val_desc ?
 347                      errdetail("Partition key of the failing row
contains %s.",
 348                                val_desc) : 0));


2. src/backend/commands/typecmds.c
2396                         ereport(ERROR,
2397                                 (errcode(ERRCODE_NOT_NULL_VIOLATION),
2398                                  errmsg("column \"%s\" of table
\"%s\" contains null values",
2399                                         NameStr(attr->attname),
2400                                         RelationGetRelationName(testrel)),
2401                                  errtablecol(testrel, attnum)));

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables
Next
From: Michael Paquier
Date:
Subject: Re: [Patch] pg_rewind: options to use restore_command fromrecovery.conf or command line