Re: plpgsql fails to reinitialize record variables at block re-entry

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql fails to reinitialize record variables at block re-entry
Дата
Msg-id 771.1512839989@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: plpgsql fails to reinitialize record variables at block re-entry  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2017-12-09 7:24 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
>> Surely that ought to have failed at the i=2 iteration.  There is
>> code in plpgsql's exec_stmt_block() that tries to reinitialize
>> PLPGSQL_DTYPE_REC variables, but it's never reached (as a quick
>> look at coverage.postgresql.org will confirm), because what it
>> scans is only the variables attached to the block by
>> plpgsql_add_initdatums() --- and that function thinks it should
>> only pay attention to PLPGSQL_DTYPE_VAR variables.

> +1

Pushed.  Some excavation in our git history says this bug has been
there since the initial commit of plpgsql, making it a little over
19 years old.  Might be a new record for the age of a PG bug.

            regards, tom lane


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

Предыдущее
От: Dang Minh Huong
Дата:
Сообщение: Re: User defined data types in Logical Replication
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Building PL/Perl with ActiveState Perl 5.22 and MSVC