forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit41e461d
committed
Improve define_custom_variable's handling of pre-existing settings.
Arrange for any problems with pre-existing settings to be reported asWARNING not ERROR, so that we don't undesirably abort the loading of theincoming add-on module. The bad setting is just discarded, as though ithad never been applied at all. (This requires a change in the API ofset_config_option. After some thought I decided the most potentiallyuseful addition was to allow callers to just pass in a desired elevel.)Arrange to restore the complete stacked state of the variable, rather thancheesily reinstalling only the active value. This ensures that custom GUCswill behave unsurprisingly even when the module loading operation occurswithin nested subtransactions that have changed the active value. Since amodule load could occur as a result of, eg, a PL function call, this is notan unlikely scenario.1 parentfa56a0c commit41e461d
File tree
6 files changed
+173
-67
lines changed- contrib/tsearch2
- src
- backend
- commands
- utils
- adt
- misc
- include/utils
6 files changed
+173
-67
lines changedLines changed: 4 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
253 | 253 |
| |
254 | 254 |
| |
255 | 255 |
| |
256 |
| - | |
257 |
| - | |
258 |
| - | |
259 |
| - | |
260 |
| - | |
| 256 | + | |
| 257 | + | |
261 | 258 |
| |
262 | 259 |
| |
263 | 260 |
| |
| |||
271 | 268 |
| |
272 | 269 |
| |
273 | 270 |
| |
274 |
| - | |
275 |
| - | |
276 |
| - | |
277 |
| - | |
278 |
| - | |
| 271 | + | |
| 272 | + | |
279 | 273 |
| |
280 | 274 |
| |
281 | 275 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
816 | 816 |
| |
817 | 817 |
| |
818 | 818 |
| |
819 |
| - | |
| 819 | + | |
820 | 820 |
| |
821 | 821 |
| |
822 | 822 |
| |
823 | 823 |
| |
824 | 824 |
| |
825 | 825 |
| |
826 |
| - | |
| 826 | + | |
827 | 827 |
| |
828 | 828 |
| |
829 | 829 |
| |
| |||
849 | 849 |
| |
850 | 850 |
| |
851 | 851 |
| |
852 |
| - | |
| 852 | + | |
853 | 853 |
| |
854 | 854 |
| |
855 | 855 |
| |
| |||
915 | 915 |
| |
916 | 916 |
| |
917 | 917 |
| |
918 |
| - | |
| 918 | + | |
919 | 919 |
| |
920 | 920 |
| |
921 |
| - | |
| 921 | + | |
922 | 922 |
| |
923 | 923 |
| |
924 |
| - | |
| 924 | + | |
925 | 925 |
| |
926 | 926 |
| |
927 | 927 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2779 | 2779 |
| |
2780 | 2780 |
| |
2781 | 2781 |
| |
2782 |
| - | |
| 2782 | + | |
2783 | 2783 |
| |
2784 | 2784 |
| |
2785 | 2785 |
| |
| |||
2868 | 2868 |
| |
2869 | 2869 |
| |
2870 | 2870 |
| |
2871 |
| - | |
| 2871 | + | |
2872 | 2872 |
| |
2873 | 2873 |
| |
2874 | 2874 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
238 | 238 |
| |
239 | 239 |
| |
240 | 240 |
| |
241 |
| - | |
| 241 | + | |
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
| |||
293 | 293 |
| |
294 | 294 |
| |
295 | 295 |
| |
296 |
| - | |
| 296 | + | |
297 | 297 |
| |
298 | 298 |
| |
299 | 299 |
| |
|
0 commit comments
Comments
(0)