Fix duplicate primary keys in partitions

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: fb9e93a2c5cf99e59a7e9362afd462f29e71bc1e
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2018-10-04T14:40:36Z
Releases: 12.0
Fix duplicate primary keys in partitions

When using the CREATE TABLE .. PARTITION OF syntax, it's possible to
cause a partition to get two primary keys if the parent already has one.
Tighten the check to disallow that.

Reported-by: Rajkumar Raghuwanshi
Author: Amul Sul
Discussion: https://postgr.es/m/CAKcux6=OnSV3-qd8Gb6W=KPPwcCz6Fe_O_MQYjTa24__Xn8XxA@mail.gmail.com

Files

Discussion