Hello
there is VIP patch of plpgsql_check_function that supports this warning
Regards
Pavel
2012/4/15 Pavel Stehule :
> 2012/4/15 Tom Lane :
>> Pavel Stehule writes:
>>> We can raise warning from CREATE OR REPLACE FUNCTION - but I would to
>>> like have plpgsql_check_function inside core - an
2012/4/15 Tom Lane :
> Pavel Stehule writes:
>> We can raise warning from CREATE OR REPLACE FUNCTION - but I would to
>> like have plpgsql_check_function inside core - and it is better place
>> for this and similar issues.
>
> I agree. This is a perfectly legal use of nested declaration scopes,
>
Pavel Stehule writes:
> We can raise warning from CREATE OR REPLACE FUNCTION - but I would to
> like have plpgsql_check_function inside core - and it is better place
> for this and similar issues.
I agree. This is a perfectly legal use of nested declaration scopes,
so it would be totally inappro
On 04/15/2012 03:49 AM, Brendan Jurd wrote:
Hello hackers,
It turns out that in a PL/PgSQL function, you can DECLARE a variable
using the same name as one of the function parameters. This has the
effect of clobbering the parameter, for example:
...
I would suggest that if the user DECLARE
2012/4/15 Brendan Jurd :
> On 15 April 2012 18:54, Pavel Stehule wrote:
>> 2012/4/15 Brendan Jurd :
>>> Perhaps it's a failure of imagination on my part, but I can't think of
>>> a legitimate reason for a programmer to deliberately use the same name
>>> to refer to a declared variable and a functi
On 15 April 2012 18:54, Pavel Stehule wrote:
> 2012/4/15 Brendan Jurd :
>> Perhaps it's a failure of imagination on my part, but I can't think of
>> a legitimate reason for a programmer to deliberately use the same name
>> to refer to a declared variable and a function parameter. What would
>> be
2012/4/15 Brendan Jurd :
> On 15 April 2012 17:55, Pavel Stehule wrote:
>> 2012/4/15 Brendan Jurd :
>>> It turns out that in a PL/PgSQL function, you can DECLARE a variable
>>> using the same name as one of the function parameters. This has the
>>> effect of clobbering the parameter, for example:
On 15 April 2012 17:55, Pavel Stehule wrote:
> 2012/4/15 Brendan Jurd :
>> It turns out that in a PL/PgSQL function, you can DECLARE a variable
>> using the same name as one of the function parameters. This has the
>> effect of clobbering the parameter, for example:
>>
...
>>
>> I would suggest t
2012/4/15 Brendan Jurd :
> Hello hackers,
>
> It turns out that in a PL/PgSQL function, you can DECLARE a variable
> using the same name as one of the function parameters. This has the
> effect of clobbering the parameter, for example:
>
> CREATE OR REPLACE FUNCTION declare_clobber(foo int)
> RETU
Hello hackers,
It turns out that in a PL/PgSQL function, you can DECLARE a variable
using the same name as one of the function parameters. This has the
effect of clobbering the parameter, for example:
CREATE OR REPLACE FUNCTION declare_clobber(foo int)
RETURNS int LANGUAGE plpgsql AS $$
10 matches
Mail list logo