forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcd07163
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 parentad5fe74 commitcd07163
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 | |
---|---|---|---|
| |||
5680 | 5680 |
| |
5681 | 5681 |
| |
5682 | 5682 |
| |
| 5683 | + | |
5683 | 5684 |
| |
5684 | 5685 |
| |
5685 | 5686 |
| |
| |||
5696 | 5697 |
| |
5697 | 5698 |
| |
5698 | 5699 |
| |
5699 |
| - | |
5700 |
| - | |
5701 |
| - | |
5702 |
| - | |
| 5700 | + | |
| 5701 | + | |
5703 | 5702 |
| |
5704 | 5703 |
| |
5705 | 5704 |
| |
5706 |
| - | |
| 5705 | + | |
5707 | 5706 |
| |
5708 |
| - | |
5709 |
| - | |
5710 |
| - | |
| 5707 | + | |
| 5708 | + | |
| 5709 | + | |
| 5710 | + | |
| 5711 | + | |
| 5712 | + | |
| 5713 | + | |
| 5714 | + | |
| 5715 | + | |
| 5716 | + | |
| 5717 | + | |
| 5718 | + | |
| 5719 | + | |
| 5720 | + | |
| 5721 | + | |
| 5722 | + | |
| 5723 | + | |
| 5724 | + | |
| 5725 | + | |
| 5726 | + | |
| 5727 | + | |
| 5728 | + | |
| 5729 | + | |
| 5730 | + | |
| 5731 | + | |
| 5732 | + | |
| 5733 | + | |
| 5734 | + | |
| 5735 | + | |
| 5736 | + | |
| 5737 | + | |
| 5738 | + | |
| 5739 | + | |
| 5740 | + | |
| 5741 | + | |
| 5742 | + | |
| 5743 | + | |
| 5744 | + | |
| 5745 | + | |
| 5746 | + | |
| 5747 | + | |
| 5748 | + | |
| 5749 | + | |
| 5750 | + | |
| 5751 | + | |
5711 | 5752 |
| |
5712 | 5753 |
| |
5713 | 5754 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3082 | 3082 |
| |
3083 | 3083 |
| |
3084 | 3084 |
| |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
3085 | 3092 |
| |
3086 | 3093 |
| |
3087 | 3094 |
| |
| |||
3193 | 3200 |
| |
3194 | 3201 |
| |
3195 | 3202 |
| |
3196 |
| - | |
| 3203 | + | |
| 3204 | + | |
3197 | 3205 |
| |
3198 | 3206 |
| |
3199 | 3207 |
| |
|
Lines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1971 | 1971 |
| |
1972 | 1972 |
| |
1973 | 1973 |
| |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
1974 | 1982 |
| |
1975 | 1983 |
| |
1976 | 1984 |
| |
| |||
1998 | 2006 |
| |
1999 | 2007 |
| |
2000 | 2008 |
| |
2001 |
| - | |
| 2009 | + | |
| 2010 | + | |
2002 | 2011 |
| |
2003 | 2012 |
| |
2004 | 2013 |
| |
|
0 commit comments
Comments
(0)