Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-05-18 Thread Robert Haas
On Wed, May 16, 2018 at 11:30 PM, Etsuro Fujita wrote: >>> Attached is a patch for fixing this issue. >> This no longer applies. > The patch has already been committed by you [1]. Thanks for committing! Well, that's embarrassing. -- Robert Haas EnterpriseDB:

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-05-16 Thread Etsuro Fujita
(2018/05/17 0:27), Robert Haas wrote: On Tue, Mar 27, 2018 at 9:00 AM, Etsuro Fujita wrote: Attached is a patch for fixing this issue. This no longer applies. The patch has already been committed by you [1]. Thanks for committing! Best regards, Etsuro Fujita

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-05-16 Thread Robert Haas
On Tue, Mar 27, 2018 at 9:00 AM, Etsuro Fujita wrote: > Attached is a patch for fixing this issue. This no longer applies. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-03-28 Thread Etsuro Fujita
(2018/03/28 18:51), Ashutosh Bapat wrote: On Wed, Mar 28, 2018 at 6:58 AM, Amit Langote wrote: Attached is a patch for fixing this issue. That looks good to me. This one would need to be back-patched to v10. Thanks. Please add to the next commitfest so

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-03-28 Thread Etsuro Fujita
(2018/03/28 10:28), Amit Langote wrote: >> Attached is a patch for fixing this issue. > > That looks good to me. This one would need to be back-patched to v10. Thanks for the review! Best regards, Etsuro Fujita

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-03-28 Thread Ashutosh Bapat
On Wed, Mar 28, 2018 at 6:58 AM, Amit Langote wrote: >> which violates the constraint on the column b (ie, b > 0), so this >> should abort. The reason for that is because CopyFrom looks at the >> parent relation's constraints, not the partition's constraints, when

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-03-27 Thread Amit Langote
Fujita-san, On 2018/03/27 22:00, Etsuro Fujita wrote: > Hi, > > While updating the tuple-routing-for-foreign-partitions patch, I noticed > oddity in the COPY FROM handling of check constraints on partition > tables. Here is an example: > > postgres=# create table pt (a int, b int) partition by

Oddity in COPY FROM handling of check constraints on partition tables

2018-03-27 Thread Etsuro Fujita
Hi, While updating the tuple-routing-for-foreign-partitions patch, I noticed oddity in the COPY FROM handling of check constraints on partition tables. Here is an example: postgres=# create table pt (a int, b int) partition by list (a); CREATE TABLE postgres=# create table p1 partition of pt