On Wed, Jan 22, 2020 at 3:23 PM MBeena Emerson <mbeena.emer...@gmail.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