Skip site navigation (1) Skip section navigation (2)

Re: Clobbered parameter names via DECLARE in PL/PgSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Clobbered parameter names via DECLARE in PL/PgSQL
Date: 2012-04-15 15:25:12
Message-ID: 8686.1334503512@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> 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 inappropriate to complain about it in normal
use of a plpgsql function.  On the other hand, it would probably be
sane and useful for CHECK FUNCTION to flag any case where an inner
declaration shadows an outer-scope name (not only the specific case
of topmost block vs function parameter).

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-04-15 15:50:01
Subject: Re: Last gasp
Previous:From: Tom LaneDate: 2012-04-15 15:21:22
Subject: Re: query planner does not canonicalize infix operators

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group