forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit29a20ff
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 parent1bbbe14 commit29a20ff
File tree
3 files changed
+68
-10
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+68
-10
lines changedLines changed: 49 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5962 | 5962 |
| |
5963 | 5963 |
| |
5964 | 5964 |
| |
| 5965 | + | |
5965 | 5966 |
| |
5966 | 5967 |
| |
5967 | 5968 |
| |
| |||
5978 | 5979 |
| |
5979 | 5980 |
| |
5980 | 5981 |
| |
5981 |
| - | |
5982 |
| - | |
5983 |
| - | |
5984 |
| - | |
| 5982 | + | |
| 5983 | + | |
5985 | 5984 |
| |
5986 | 5985 |
| |
5987 | 5986 |
| |
5988 |
| - | |
| 5987 | + | |
5989 | 5988 |
| |
5990 |
| - | |
5991 |
| - | |
5992 |
| - | |
| 5989 | + | |
| 5990 | + | |
| 5991 | + | |
| 5992 | + | |
| 5993 | + | |
| 5994 | + | |
| 5995 | + | |
| 5996 | + | |
| 5997 | + | |
| 5998 | + | |
| 5999 | + | |
| 6000 | + | |
| 6001 | + | |
| 6002 | + | |
| 6003 | + | |
| 6004 | + | |
| 6005 | + | |
| 6006 | + | |
| 6007 | + | |
| 6008 | + | |
| 6009 | + | |
| 6010 | + | |
| 6011 | + | |
| 6012 | + | |
| 6013 | + | |
| 6014 | + | |
| 6015 | + | |
| 6016 | + | |
| 6017 | + | |
| 6018 | + | |
| 6019 | + | |
| 6020 | + | |
| 6021 | + | |
| 6022 | + | |
| 6023 | + | |
| 6024 | + | |
| 6025 | + | |
| 6026 | + | |
| 6027 | + | |
| 6028 | + | |
| 6029 | + | |
| 6030 | + | |
| 6031 | + | |
| 6032 | + | |
| 6033 | + | |
5993 | 6034 |
| |
5994 | 6035 |
| |
5995 | 6036 |
| |
|
Lines changed: 9 additions & 1 deletion
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 |
| |
|
Lines changed: 10 additions & 1 deletion
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)