On Mon, 28 Aug 2023 at 15:05, Konstantin Knizhnik <knizh...@garret.ru> wrote: > The following assignment of format is not corrects: > > It has to be copied as below: > > portal->formats = (int16 *) > MemoryContextAlloc(portal->portalContext, > natts * sizeof(int16)); > memcpy(portal->formats, formats, natts * sizeof(int16));
I attached a new version of the patch where I now did this. But I also moved the code around quite a bit, since all this tupDesc/format delaying is only needed for exec_simple_query. The original changes actually broke some prepared statements that were using protocol level Bind messages.
v2-0001-Support-prepared-statement-invalidation-when-resu.patch
Description: Binary data
v2-0002-Completely-remove-fixed_result-from-CachedPlanSou.patch
Description: Binary data