Re: setting per-database/role parameters checks them against wrong context - Mailing list pgsql-hackers

From Tom Lane
Subject Re: setting per-database/role parameters checks them against wrong context
Date
Msg-id 5467.1359146159@sss.pgh.pa.us
Whole thread Raw
In response to Re: setting per-database/role parameters checks them against wrong context  (Bruce Momjian <bruce@momjian.us>)
Responses Re: setting per-database/role parameters checks them against wrong context
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
>> diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
>> index 6b202e0..0677059 100644
>> --- a/src/backend/utils/misc/guc.c
>> +++ b/src/backend/utils/misc/guc.c
>> @@ -5150,7 +5150,7 @@ set_config_option(const char *name, const char *value,
>> elevel = IsUnderPostmaster ? DEBUG3 : LOG;
>> }
>> else if (source == PGC_S_DATABASE || source == PGC_S_USER ||
>> -                 source == PGC_S_DATABASE_USER)
>> +                 source == PGC_S_DATABASE_USER || source == PG_S_SESSION)
>> elevel = WARNING;
>> else
>> elevel = ERROR;

> Is there any opinion on whether we need this patch?  It basically allows
> SET from a session to issue a warning rather than an error.

Surely this is a completely horrid idea.  It doesn't "allow" SET to
throw a warning, it changes all interactive-SET cases from ERROR to
WARNING.  That's a whole lot of collateral damage to fix a very narrow
case that's not even there anymore.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Question regarding Sync message and unnamed portal
Next
From: Bruce Momjian
Date:
Subject: Re: setting per-database/role parameters checks them against wrong context