On Tue, Jan 23, 2018 at 12:25 PM, Ashutosh Sharma <ashu.coe...@gmail.com> wrote: >> > > That's right. But, shouldn't a partition that not at all fall in the > partition range be rejected when user tries to attach it. I feel we > should at least try throwing a WARNING message for it. Thoughts? >
One can add constraints contradicting the partition constraints after the table is attached as partition. Moreover, one can add multiple constraints over the time that together contradict partition constraints. I don't think it's worth the effort to make sure that all constraints taken together contradict partition constraints or not. The downside is simply that the partition will remain empty forever, but then that's what user wants, since s/he has added the constraints. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company