Re: Review: plpgsql.extra_warnings, plpgsql.extra_errors - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Review: plpgsql.extra_warnings, plpgsql.extra_errors
Date
Msg-id CAFj8pRBHZbsii3mErHYHnv-S_d1yEK+Y_TTvL-Yn4YMU5vaO-A@mail.gmail.com
Whole thread Raw
In response to Re: Review: plpgsql.extra_warnings, plpgsql.extra_errors  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: Review: plpgsql.extra_warnings, plpgsql.extra_errors
List pgsql-hackers



2014-03-23 15:53 GMT+01:00 Petr Jelinek <petr@2ndquadrant.com>:


On 23/03/14 15:14, Pavel Stehule wrote:
Review shadow_v6 patch


I have only one objection - What I remember - more usual is using a list
instead a bitmap for these purposes - typical is DefElem struct. Isn't
it better?


To me it seemed that for similar use cases (list of boolean options) the bitmap is more common in the existing code, question might be if we go over the 32 bits any time soon which does not seem likely to me for the checks.

I don't afraid so 32 bits it is too low - in this case, list can be used without compatibility issues.

if others has no problem with it, I have not a problem too.

doc should be enhanced by:

SET plpgsql.extra_warnings TO 'shadowed_variables';

CREATE FUNCTION foo(f1 int) RETURNS int AS $$
DECLARE
f1 int;
BEGIN
RETURN f1;
END
$$ LANGUAGE plpgsql;

Regards

Pavel
 
--
 Petr Jelinek                  http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: jsonb and nested hstore
Next
From: Peter Geoghegan
Date:
Subject: Re: jsonb and nested hstore