Hello
Andy Colson found a bug in GUC implementation.
When we have a custom SUSET variable, like plpgsql.variable_conflikt,
then setting this variable before plpgsql initalisation raises a
exception, but it raise a exception when some plpgsql function is
created. Try to execute a attached script - a set statement is ok, but
CREATE FUNCTION fails.
repeated setting this GUC raise a strange message
postgres=# \i script.sql
SET
before create function
psql:script.sql:13: ERROR: 42501: permission denied to set parameter
"plpgsql.variable_conflict"
LOCATION: set_config_option, guc.c:5208
after function
postgres=# \i script.sql
SET
before create function
psql:script.sql:13: ERROR: XX000: attempt to redefine parameter
"plpgsql.variable_conflict"
LOCATION: define_custom_variable, guc.c:6333
after function
Regards
Pavel Stehule