Re: Problems with variable cursorname in ecpg

Поиск
Список
Период
Сортировка
От Boszormenyi Zoltan
Тема Re: Problems with variable cursorname in ecpg
Дата
Msg-id 4BB32F6A.604@cybertec.at
обсуждение исходный текст
Ответ на Re: Problems with variable cursorname in ecpg  (Boszormenyi Zoltan <zb@cybertec.at>)
Ответы ECPG check variables hidden by locals v2  (Boszormenyi Zoltan <zb@cybertec.at>)
ECPG doesn't delete its output file in case of an error  (Boszormenyi Zoltan <zb@cybertec.at>)
Список pgsql-hackers
Boszormenyi Zoltan írta:
> Boszormenyi Zoltan írta:
>
>> I think you forget that in this case, only global variables are
>> usable in the DECLARE in this case, no local variables in
>> functions preceding the DECLARE are visible to it.
>>
>> What we need here is an extra check in ECPGdump_a_type().
>> We need to raise an error if
>>      ECPGdump_a_type(name, type, ...)
>> and
>>     var = with find_variable(name);
>> on the passed name disagrees in the variable type and maybe
>> a warning if they disagree in the brace_level. The same applies
>> to the indicator variable. For that, we need to pass the brace_level
>> to ECPGdump_a_type() for both the variable and the indicator.
>>
>>
>
> I was thinking about something like the attached patch.
> It passes all the regression tests.
>

And here's the code to test with.

> Best regards,
> Zoltán Böszörményi
>
>
> ------------------------------------------------------------------------
>
>


--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/


Вложения

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

Предыдущее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: Problems with variable cursorname in ecpg
Следующее
От: Boszormenyi Zoltan
Дата:
Сообщение: Re: Problems with variable cursorname in ecpg