forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd90d59e
committed
Reject attempts to alter composite types used in indexes.
find_composite_type_dependencies() ignored indexes, which is a poordecision because an expression index could have a stored column ofa composite (or other container) type even when the underlying tabledoes not. Teach it to detect such cases and error out. We have towork a bit harder than for other relations because the pg_depend entrywon't identify the specific index column of concern, but it's not muchnew code.This does not address bug #17872's original complaint that droppinga column in such a type might lead to violations of the uniquenessproperty that a unique index is supposed to ensure. That seems ofmuch less concern to me because it won't lead to crashes.Per bug #17872 from Alexander Lakhin. Back-patch to all supportedbranches.Discussion:https://postgr.es/m/17872-d0fbb799dc3fd85d@postgresql.org1 parent7c48734 commitd90d59e
File tree
3 files changed
+67
-10
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+67
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6475 | 6475 | | |
6476 | 6476 | | |
6477 | 6477 | | |
| 6478 | + | |
6478 | 6479 | | |
6479 | 6480 | | |
6480 | 6481 | | |
| |||
6491 | 6492 | | |
6492 | 6493 | | |
6493 | 6494 | | |
6494 | | - | |
6495 | | - | |
6496 | | - | |
6497 | | - | |
| 6495 | + | |
| 6496 | + | |
6498 | 6497 | | |
6499 | 6498 | | |
6500 | 6499 | | |
6501 | | - | |
| 6500 | + | |
6502 | 6501 | | |
6503 | | - | |
6504 | | - | |
6505 | | - | |
| 6502 | + | |
| 6503 | + | |
| 6504 | + | |
| 6505 | + | |
| 6506 | + | |
| 6507 | + | |
| 6508 | + | |
| 6509 | + | |
| 6510 | + | |
| 6511 | + | |
| 6512 | + | |
| 6513 | + | |
| 6514 | + | |
| 6515 | + | |
| 6516 | + | |
| 6517 | + | |
| 6518 | + | |
| 6519 | + | |
| 6520 | + | |
| 6521 | + | |
| 6522 | + | |
| 6523 | + | |
| 6524 | + | |
| 6525 | + | |
| 6526 | + | |
| 6527 | + | |
| 6528 | + | |
| 6529 | + | |
| 6530 | + | |
| 6531 | + | |
| 6532 | + | |
| 6533 | + | |
| 6534 | + | |
| 6535 | + | |
| 6536 | + | |
| 6537 | + | |
| 6538 | + | |
| 6539 | + | |
| 6540 | + | |
| 6541 | + | |
| 6542 | + | |
| 6543 | + | |
| 6544 | + | |
| 6545 | + | |
6506 | 6546 | | |
6507 | 6547 | | |
6508 | 6548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3093 | 3093 | | |
3094 | 3094 | | |
3095 | 3095 | | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
3096 | 3103 | | |
3097 | 3104 | | |
3098 | 3105 | | |
| |||
3204 | 3211 | | |
3205 | 3212 | | |
3206 | 3213 | | |
3207 | | - | |
| 3214 | + | |
| 3215 | + | |
3208 | 3216 | | |
3209 | 3217 | | |
3210 | 3218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1980 | 1980 | | |
1981 | 1981 | | |
1982 | 1982 | | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
1983 | 1991 | | |
1984 | 1992 | | |
1985 | 1993 | | |
| |||
2007 | 2015 | | |
2008 | 2016 | | |
2009 | 2017 | | |
2010 | | - | |
| 2018 | + | |
| 2019 | + | |
2011 | 2020 | | |
2012 | 2021 | | |
2013 | 2022 | | |
| |||
0 commit comments
Comments
(0)