From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: plpgsql fails to reinitialize record variables at block re-entry |
Date: | 2017-12-09 17:19:49 |
Message-ID: | 771.1512839989@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2017-12-09 7:24 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2017-12-09 18:27:25 | Re: Building PL/Perl with ActiveState Perl 5.22 and MSVC |
Previous Message | Dang Minh Huong | 2017-12-09 15:33:24 | Re: User defined data types in Logical Replication |