- Notifications
You must be signed in to change notification settings - Fork28
Commit9f376e1
committed
Ensure an index that uses a whole-row Var still depends on its table.
We failed to record any dependency on the underlying table for an indexdeclared like "create index i on t (foo(t.*))". This would create troubleif the table were dropped without previously dropping the index. To fix,simplify some overly-cute code in index_create(), accepting the possibilitythat sometimes the whole-table dependency will be redundant. Also documentthis hazard in dependency.c. Per report from Kevin Grittner.In passing, prevent a core dump in pg_get_indexdef() if the index's tablecan't be found. I came across this while experimenting with Kevin'sexample. Not sure it's a real issue when the catalogs aren't corrupt, butmight as well be cautious.Back-patch to all supported versions.1 parent35d5d96 commit9f376e1
File tree
3 files changed
+40
-14
lines changed- src/backend
- catalog
- utils/adt
3 files changed
+40
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
1241 | 1247 | | |
1242 | 1248 | | |
1243 | 1249 | | |
| |||
1350 | 1356 | | |
1351 | 1357 | | |
1352 | 1358 | | |
1353 | | - | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1354 | 1367 | | |
1355 | 1368 | | |
1356 | 1369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
858 | 857 | | |
859 | 858 | | |
860 | 859 | | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
867 | 864 | | |
868 | | - | |
869 | | - | |
870 | | - | |
| 865 | + | |
871 | 866 | | |
872 | 867 | | |
873 | 868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
857 | 858 | | |
858 | 859 | | |
859 | 860 | | |
860 | | - | |
| 861 | + | |
861 | 862 | | |
862 | 863 | | |
863 | 864 | | |
| |||
1261 | 1262 | | |
1262 | 1263 | | |
1263 | 1264 | | |
1264 | | - | |
| 1265 | + | |
1265 | 1266 | | |
1266 | 1267 | | |
1267 | 1268 | | |
| |||
6314 | 6315 | | |
6315 | 6316 | | |
6316 | 6317 | | |
6317 | | - | |
| 6318 | + | |
6318 | 6319 | | |
6319 | 6320 | | |
6320 | 6321 | | |
| |||
6817 | 6818 | | |
6818 | 6819 | | |
6819 | 6820 | | |
| 6821 | + | |
| 6822 | + | |
| 6823 | + | |
| 6824 | + | |
| 6825 | + | |
| 6826 | + | |
| 6827 | + | |
| 6828 | + | |
| 6829 | + | |
| 6830 | + | |
| 6831 | + | |
| 6832 | + | |
| 6833 | + | |
| 6834 | + | |
| 6835 | + | |
| 6836 | + | |
| 6837 | + | |
6820 | 6838 | | |
6821 | 6839 | | |
6822 | 6840 | | |
| |||
0 commit comments
Comments
(0)