Re: setting per-database/role parameters checks them against wrong context

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Selena Deckelmann <selena(at)chesnok(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: setting per-database/role parameters checks them against wrong context
Date: 2013-01-25 20:40:57
Message-ID: 20130125204057.GP6848@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 25, 2013 at 03:35:59PM -0500, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)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.

Agreed.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2013-01-25 20:50:48 Why will hashed SubPlan not use multiple batches
Previous Message Tom Lane 2013-01-25 20:35:59 Re: setting per-database/role parameters checks them against wrong context