From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | MBeena Emerson <mbeena(dot)emerson(at)gmail(dot)com> |
Cc: | Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Error message inconsistency |
Date: | 2020-01-23 04:31:19 |
Message-ID: | CAA4eK1L6CBWprTYMcwu7-71kg+DD6_T7nQyxf0fyAH5kTbWUSQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 22, 2020 at 3:23 PM MBeena Emerson <mbeena(dot)emerson(at)gmail(dot)com> wrote:
>
> > -----------------------------------------------------------------------------------------------------
> > 14. src/backend/commands/tablecmds.c
> >
> > 5310 else
> > 5311 ereport(ERROR,
> > 5312 (errcode(ERRCODE_CHECK_VIOLATION),
> > 5313 errmsg("partition constraint is violated by some row")));
> >
> > Added relation name for this error. This can be verified by below example:
> > Ex:
> > CREATE TABLE list_parted (a int,b char)PARTITION BY LIST (a);
> > CREATE TABLE part_1 (LIKE list_parted);
> > INSERT INTO part_1 VALUES (3, 'a');
> > ALTER TABLE list_parted ATTACH PARTITION part_1 FOR VALUES IN (2);
> >
> > Without patch:
> > ERROR: partition constraint is violated by some row
> > With patch:
> > ERROR: partition constraint "part_1" is violated by some row
>
> Here it seems as if "part_1" is the constraint name.
>
I agree.
> It would be
> better to change it to:
>
> partition constraint is violated by some row in relation "part_1" OR
> partition constraint of relation "part_1" is violated b some row
>
+1 for the second option suggested by Beena.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2020-01-23 04:33:33 | Re: Do we need to handle orphaned prepared transactions in the server? |
Previous Message | Amit Kapila | 2020-01-23 03:37:23 | Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions |