On Thu, May 25, 2017 at 9:59 AM, amul sul <sula...@gmail.com> wrote: > On Mon, May 22, 2017 at 2:23 PM, amul sul <sula...@gmail.com> wrote: >> >> Updated patch attached. Thanks a lot for review. >> > Minor fix in the document, PFA.
Patch need rebase ------- Function header is not consistent with other neighbouring functions (some function contains function name in the header but others don't) +/* + * Compute the hash value for given not null partition key values. + */ ------ postgres=# create table t1 partition of t for values with (modulus 2, remainder 1) partition by range(a); CREATE TABLE postgres=# create table t1_1 partition of t1 for values from (8) to (10); CREATE TABLE postgres=# insert into t1 values(8); 2017-06-03 18:41:46.067 IST  ERROR: new row for relation "t1_1" violates partition constraint 2017-06-03 18:41:46.067 IST  DETAIL: Failing row contains (8). 2017-06-03 18:41:46.067 IST  STATEMENT: insert into t1 values(8); ERROR: new row for relation "t1_1" violates partition constraint DETAIL: Failing row contains (8). The value 8 is violating the partition constraint of the t1 and we are trying to insert to value in t1, still, the error is coming from the leaf level table t1_1, that may be fine but from error, it appears that it's violating the constraint of t1_1 whereas it's actually violating the constraint of t1. >From Implementation, it appears that based on the key are identifying the leaf partition and it's only failing during ExecInsert while checking the partition constraint. Other than that, patch looks fine to me. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers