-
- Downloads
Remember the source GucContext for each GUC parameter.
We used to just remember the GucSource, but saving GucContext too provides a little more information --- notably, whether a SET was done by a superuser or regular user. This allows us to rip out the fairly dodgy code that define_custom_variable used to use to try to infer the context to re-install a pre-existing setting with. In particular, it now works for a superuser to SET a extension's SUSET custom variable before loading the associated extension, because GUC can remember whether the SET was done as a superuser or not. The plperl regression tests contain an example where this is useful.
Showing
- src/backend/utils/misc/guc-file.l 12 additions, 6 deletionssrc/backend/utils/misc/guc-file.l
- src/backend/utils/misc/guc.c 47 additions, 61 deletionssrc/backend/utils/misc/guc.c
- src/include/utils/guc_tables.h 8 additions, 6 deletionssrc/include/utils/guc_tables.h
- src/pl/plperl/expected/plperl_init.out 1 addition, 1 deletionsrc/pl/plperl/expected/plperl_init.out
- src/pl/plperl/expected/plperl_shared.out 1 addition, 2 deletionssrc/pl/plperl/expected/plperl_shared.out
- src/pl/plperl/expected/plperlu.out 1 addition, 1 deletionsrc/pl/plperl/expected/plperlu.out
- src/pl/plperl/sql/plperl_init.sql 1 addition, 1 deletionsrc/pl/plperl/sql/plperl_init.sql
- src/pl/plperl/sql/plperl_shared.sql 1 addition, 2 deletionssrc/pl/plperl/sql/plperl_shared.sql
- src/pl/plperl/sql/plperlu.sql 1 addition, 1 deletionsrc/pl/plperl/sql/plperlu.sql
Loading
Please register or sign in to comment