forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfb9e93a
committed
Fix duplicate primary keys in partitions
When using the CREATE TABLE .. PARTITION OF syntax, it's possible tocause a partition to get two primary keys if the parent already has one.Tighten the check to disallow that.Reported-by: Rajkumar RaghuwanshiAuthor: Amul SulDiscussion:https://postgr.es/m/CAKcux6=OnSV3-qd8Gb6W=KPPwcCz6Fe_O_MQYjTa24__Xn8XxA@mail.gmail.com1 parent09921f3 commitfb9e93a
File tree
3 files changed
+30
-7
lines changed- src
- backend/catalog
- test/regress
- expected
- sql
3 files changed
+30
-7
lines changedLines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
225 | 225 |
| |
226 |
| - | |
| 226 | + | |
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
|
Lines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
800 | 800 |
| |
801 | 801 |
| |
802 | 802 |
| |
| 803 | + | |
| 804 | + | |
| 805 | + | |
803 | 806 |
| |
804 |
| - | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
805 | 821 |
| |
806 | 822 |
| |
807 | 823 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
404 | 411 |
| |
405 | 412 |
| |
406 |
| - | |
| 413 | + | |
407 | 414 |
| |
408 | 415 |
| |
409 | 416 |
| |
|
0 commit comments
Comments
(0)