forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitca9e792
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 parent751ba1a commitca9e792
File tree
4 files changed
+89
-1
lines changed- src/bin/pg_dump
- t
4 files changed
+89
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5950 | 5950 |
| |
5951 | 5951 |
| |
5952 | 5952 |
| |
| 5953 | + | |
5953 | 5954 |
| |
5954 | 5955 |
| |
5955 | 5956 |
| |
| |||
6148 | 6149 |
| |
6149 | 6150 |
| |
6150 | 6151 |
| |
| 6152 | + | |
6151 | 6153 |
| |
6152 | 6154 |
| |
6153 | 6155 |
| |
| |||
12019 | 12021 |
| |
12020 | 12022 |
| |
12021 | 12023 |
| |
12022 |
| - | |
| 12024 | + | |
| 12025 | + | |
12023 | 12026 |
| |
12024 | 12027 |
| |
12025 | 12028 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
| 230 | + | |
230 | 231 |
| |
231 | 232 |
| |
232 | 233 |
| |
|
Lines changed: 44 additions & 0 deletions
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 |
| |
|
Lines changed: 40 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2095 | 2095 |
| |
2096 | 2096 |
| |
2097 | 2097 |
| |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
2098 | 2119 |
| |
2099 | 2120 |
| |
2100 | 2121 |
| |
| |||
2307 | 2328 |
| |
2308 | 2329 |
| |
2309 | 2330 |
| |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
2310 | 2350 |
| |
2311 | 2351 |
| |
2312 | 2352 |
| |
|
0 commit comments
Comments
(0)