Re: Support prepared statement invalidation when result types change - Mailing list pgsql-hackers

From Jelte Fennema
Subject Re: Support prepared statement invalidation when result types change
Date
Msg-id CAGECzQSNeE5O4jbcyPNU0TVuEHhANQBp0q3iWOxAWjNVi2qnAw@mail.gmail.com
Whole thread Raw
In response to Re: Support prepared statement invalidation when result types change  (Konstantin Knizhnik <knizhnik@garret.ru>)
List pgsql-hackers
On Mon, 28 Aug 2023 at 15:05, Konstantin Knizhnik <knizhnik@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.

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Eager page freeze criteria clarification
Next
From: Peter Geoghegan
Date:
Subject: Re: Eager page freeze criteria clarification