custom variables and PGC_SUSET issue - Mailing list pgsql-hackers

From Pavel Stehule
Subject custom variables and PGC_SUSET issue
Date
Msg-id CAFj8pRCD4E1tB_2EU10fj6hmkosZRxZZAnKdugK6mcZ7dg7EgA@mail.gmail.com
Whole thread Raw
Responses Re: custom variables and PGC_SUSET issue
Re: custom variables and PGC_SUSET issue
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [v9.2] Fix Leaky View Problem
Next
From: Tom Lane
Date:
Subject: Re: typo