forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit334cc4c
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 parent11213d4 commit334cc4c
File tree
3 files changed
+68
-10
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+68
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6296 | 6296 | | |
6297 | 6297 | | |
6298 | 6298 | | |
| 6299 | + | |
6299 | 6300 | | |
6300 | 6301 | | |
6301 | 6302 | | |
| |||
6312 | 6313 | | |
6313 | 6314 | | |
6314 | 6315 | | |
6315 | | - | |
6316 | | - | |
6317 | | - | |
6318 | | - | |
| 6316 | + | |
| 6317 | + | |
6319 | 6318 | | |
6320 | 6319 | | |
6321 | 6320 | | |
6322 | | - | |
| 6321 | + | |
6323 | 6322 | | |
6324 | | - | |
6325 | | - | |
6326 | | - | |
| 6323 | + | |
| 6324 | + | |
| 6325 | + | |
| 6326 | + | |
| 6327 | + | |
| 6328 | + | |
| 6329 | + | |
| 6330 | + | |
| 6331 | + | |
| 6332 | + | |
| 6333 | + | |
| 6334 | + | |
| 6335 | + | |
| 6336 | + | |
| 6337 | + | |
| 6338 | + | |
| 6339 | + | |
| 6340 | + | |
| 6341 | + | |
| 6342 | + | |
| 6343 | + | |
| 6344 | + | |
| 6345 | + | |
| 6346 | + | |
| 6347 | + | |
| 6348 | + | |
| 6349 | + | |
| 6350 | + | |
| 6351 | + | |
| 6352 | + | |
| 6353 | + | |
| 6354 | + | |
| 6355 | + | |
| 6356 | + | |
| 6357 | + | |
| 6358 | + | |
| 6359 | + | |
| 6360 | + | |
| 6361 | + | |
| 6362 | + | |
| 6363 | + | |
| 6364 | + | |
| 6365 | + | |
| 6366 | + | |
| 6367 | + | |
6327 | 6368 | | |
6328 | 6369 | | |
6329 | 6370 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3095 | 3095 | | |
3096 | 3096 | | |
3097 | 3097 | | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
3098 | 3105 | | |
3099 | 3106 | | |
3100 | 3107 | | |
| |||
3206 | 3213 | | |
3207 | 3214 | | |
3208 | 3215 | | |
3209 | | - | |
| 3216 | + | |
| 3217 | + | |
3210 | 3218 | | |
3211 | 3219 | | |
3212 | 3220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1984 | 1984 | | |
1985 | 1985 | | |
1986 | 1986 | | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
1987 | 1995 | | |
1988 | 1996 | | |
1989 | 1997 | | |
| |||
2011 | 2019 | | |
2012 | 2020 | | |
2013 | 2021 | | |
2014 | | - | |
| 2022 | + | |
| 2023 | + | |
2015 | 2024 | | |
2016 | 2025 | | |
2017 | 2026 | | |
| |||
0 commit comments
Comments
(0)