On Wed, 24 Jul 2024 at 17:39, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > This patch starts to allow a prepared statement to continue to work even
> > when the result type changes.
>
> What this is is a wire protocol break.
Yeah that's what I realised as well in my latest email. I withdrew
this patch from the commitfest now to reflect that. Until we get the
logic for protocol bumps in:
https://www.postgresql.org/message-id/flat/CAGECzQQPQO9K1YeBKe%2BE8yfpeG15cZGd3bAHexJ%2B6dpLP-6jWw%40mail.gmail.com#2386179bc970ebaf1786501f687a7bb2
> What if the client has
> previously done a Describe Statement on the prepared statement?
> We have no mechanism for notifying it that that information is
> now falsified. The error is thrown to prevent us from getting
> into a situation where we'd need to do that.
However, this makes me think of an intermediary solution. In some
sense it's only really a protocol break if the result type changes
between the last Describe and the current Execute. So would it be okay
if a Describe triggers the proposed invalidation?