forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0161074
committed
Fix pg_dump's failure to honor dependencies of SQL functions.
A new-style SQL function can contain a parse-time dependencyon a unique index, much as views and matviews can (such casesarise from GROUP BY and ON CONFLICT clauses, for example).To dump and restore such a function successfully, pg_dump mustpostpone the function until after the unique index is created,which will happen in the post-data part of the dump. Thereforewe have to remove the normal constraint that functions aredumped in pre-data. Add code similar to the existing logicthat handles this for matviews. I added test cases for bothas well, since code coverage tests showed that we weren'ttesting the matview logic.Per report from Sami Imseih. Back-patch to v14 wherenew-style SQL functions came in.Discussion:https://postgr.es/m/2C1933AB-C2F8-499B-9D18-4AC1882256A0@amazon.com1 parentb3f32a6 commit0161074
File tree
4 files changed
+89
-1
lines changed- src/bin/pg_dump
- t
4 files changed
+89
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6085 | 6085 | | |
6086 | 6086 | | |
6087 | 6087 | | |
| 6088 | + | |
6088 | 6089 | | |
6089 | 6090 | | |
6090 | 6091 | | |
| |||
6283 | 6284 | | |
6284 | 6285 | | |
6285 | 6286 | | |
| 6287 | + | |
6286 | 6288 | | |
6287 | 6289 | | |
6288 | 6290 | | |
| |||
12168 | 12170 | | |
12169 | 12171 | | |
12170 | 12172 | | |
12171 | | - | |
| 12173 | + | |
| 12174 | + | |
12172 | 12175 | | |
12173 | 12176 | | |
12174 | 12177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
871 | 893 | | |
872 | 894 | | |
873 | 895 | | |
| |||
1062 | 1084 | | |
1063 | 1085 | | |
1064 | 1086 | | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1065 | 1109 | | |
1066 | 1110 | | |
1067 | 1111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2490 | 2490 | | |
2491 | 2491 | | |
2492 | 2492 | | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
2493 | 2514 | | |
2494 | 2515 | | |
2495 | 2516 | | |
| |||
2732 | 2753 | | |
2733 | 2754 | | |
2734 | 2755 | | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
2735 | 2775 | | |
2736 | 2776 | | |
2737 | 2777 | | |
| |||
0 commit comments
Comments
(0)