Re: bugfix for cursor arguments in named notation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bugfix for cursor arguments in named notation
Дата
Msg-id 26173.1333552232@sss.pgh.pa.us
обсуждение исходный текст
Ответ на bugfix for cursor arguments in named notation  (Yeb Havinga <yebhavinga@gmail.com>)
Ответы Re: bugfix for cursor arguments in named notation  (Yeb Havinga <yebhavinga@gmail.com>)
Список pgsql-hackers
Yeb Havinga <yebhavinga@gmail.com> writes:
> Using a cursor argument name equal to another plpgsql variable results 
> in the error:
> cursor .. has no argument named ""

> The attached patch fixes that.

> Instead of solving the issue like is done in the patch, another way 
> would be to expose internal_yylex() so that could be used instead of 
> yylex() by read_cursor_args when reading the argument name, and would 
> always return the argument name in yylval.str.

I think a better way would be to temporarily set
plpgsql_IdentifierLookup to IDENTIFIER_LOOKUP_DECLARE, so as to suppress
variable name lookup in the first place.  The patch as you have it seems
to me to make too many assumptions about what name lookup might produce.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #6572: The example of SPI_execute is bogus
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: [PATCH] lock_timeout and common SIGALRM framework