Re: plpgsql.warn_shadow

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Marko Tiikkaja <marko(at)joh(dot)to>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jim Nasby <jim(at)nasby(dot)net>
Subject: Re: plpgsql.warn_shadow
Date: 2014-01-20 14:25:22
Message-ID: 0471E177-16B6-4E68-9B79-31FA29D65C9C@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jan20, 2014, at 14:05 , Marko Tiikkaja <marko(at)joh(dot)to> wrote:
> On 1/20/14 1:55 PM, Robert Haas wrote:
>> On Mon, Jan 20, 2014 at 7:16 AM, Marko Tiikkaja <marko(at)joh(dot)to> wrote:
>>> What's so hard about plpgsql.warnings='all'? Or if the fact that it's a
>>> list is your concern, I'm not going to oppose to making it a boolean.
>>
>> Sure, that'd be fine. What I don't want is to have to start each function with:
>>
>> #option warn_this
>> #option warn_that
>> #option warn_theotherthing
>> #option warn_somethingelse
>> #option warn_yetanotherthing
>> #option warn_whatdoesthisdoagain
>
> Right. Completely agreed. The only reason I had them in the patch is to have the
> ability to turn *off* a specific warning for a particular function. But even
> that's of a bit dubious a value.

I think as long as there's an easy way to avoid a warning - in the case of
warn_shadow e.g. by renaming the shadowing variable - there's no real requirement
to be able to disable the warning on a per-function basis.

And if there isn't a simple way to avoid a particular warning then we
ought not warn about it anyway, I guess, because that would indicate that there
are genuine reasons for doing whatever it is the warning complains about.

best regards,
Florian Pflug

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mel Gorman 2014-01-20 14:27:03 Re: [Lsf-pc] Linux kernel impact on PostgreSQL performance
Previous Message Florian Pflug 2014-01-20 14:20:51 Re: [PATCH] Negative Transition Aggregate Functions (WIP)