- Notifications
You must be signed in to change notification settings - Fork28
Commitfa5f3a4
committed
Fix handling of COMMENT for domain constraints
For a non-superuser, changing a comment on a domain constraint wasleading to a cache lookup failure as the code tried to perform theownership lookup on the constraint OID itself, thinking that it was atype, but this check needs to happen on the type the domain constraintrelies on. As the type a domain constraint relies on can be guesseddirectly based on the constraint OID, first fetch its type OID andperform the ownership on it.This is broken since7eca575, which has split the handling of commentsfor table constraints and domain constraints, so back-patch down to9.5.Reported-by: Clemens LadischAuthor: Daniel Gustafsson, Michael PaquierReviewed-by: Álvaro HerreraDiscussion:https://postgr.es/m/15833-808e11904835d26f@postgresql.orgBackpatch-through: 9.51 parent936b5e5 commitfa5f3a4
File tree
3 files changed
+52
-1
lines changed- src
- backend/catalog
- test/regress
- input
- output
3 files changed
+52
-1
lines changedLines changed: 23 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2255 | 2255 |
| |
2256 | 2256 |
| |
2257 | 2257 |
| |
2258 |
| - | |
2259 | 2258 |
| |
2260 | 2259 |
| |
2261 | 2260 |
| |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
2262 | 2284 |
| |
2263 | 2285 |
| |
2264 | 2286 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
521 | 525 |
| |
522 | 526 |
| |
523 | 527 |
| |
| |||
535 | 539 |
| |
536 | 540 |
| |
537 | 541 |
| |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
538 | 550 |
| |
539 | 551 |
| |
| 552 | + | |
| 553 | + | |
| 554 | + |
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
702 | 702 |
| |
703 | 703 |
| |
704 | 704 |
| |
| 705 | + | |
| 706 | + | |
| 707 | + | |
705 | 708 |
| |
706 | 709 |
| |
707 | 710 |
| |
| |||
718 | 721 |
| |
719 | 722 |
| |
720 | 723 |
| |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
721 | 733 |
| |
722 | 734 |
| |
| 735 | + | |
| 736 | + |
0 commit comments
Comments
(0)