Re: Clobbered parameter names via DECLARE in PL/PgSQL

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Clobbered parameter names via DECLARE in PL/PgSQL
Дата
Msg-id CAFj8pRC3YDZW9n9TyfAy3iN5RQAU3UZt_vU1Wa=Yykf+GfTn6g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Clobbered parameter names via DECLARE in PL/PgSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Clobbered parameter names via DECLARE in PL/PgSQL  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
2012/4/15 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.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).

yes, it is very simple check there. There should be "levels" of
warnings in future and performance or semantic warnings.

But, we don't need to increase complexity of CHECK FUNCTION now. A
design of CHECK FUNCTION was rich for this purposes. And we need to
find way to push plpgsql_check_function to core first.

Regards

Pavel





>
>                        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Last gasp
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #6572: The example of SPI_execute is bogus