| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix duplicate primary keys in partitions |
| Date: | 2018-10-04 14:50:10 |
| Message-ID: | E1g84x8-0005zw-9G@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fb9e93a2c5cf99e59a7e9362afd462f29e71bc1e
Modified Files
--------------
src/backend/catalog/index.c | 10 +++++-----
src/test/regress/expected/indexing.out | 18 +++++++++++++++++-
src/test/regress/sql/indexing.sql | 9 ++++++++-
3 files changed, 30 insertions(+), 7 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2018-10-04 18:04:01 | pgsql: Centralize executor's opening/closing of Relations for rangetabl |
| Previous Message | Michael Paquier | 2018-10-04 09:29:54 | pgsql: Refactor user-facing SQL functions signalling backends |