pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: imchifan@mail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19862: Replacing a cast leaves prepared statements using the old cast function
Date: Wed, 11 Nov 2026 14:58:48 +0200
Message-ID: <419acdd8-a100-4cfb-a1e3-507da21d962c@iki.fi> (raw)
In-Reply-To: <19862-084810a081ea79a3@postgresql.org>
References: <19862-084810a081ea79a3@postgresql.org>

> Dropping and recreating a user-defined cast with a different cast function
> does not invalidate a statement prepared while the original cast existed.
> After the replacement, direct execution uses the new function and returns
> v2, while the prepared statement silently continues to use the old function
> and returns v1.

There are gaps in invalidating prepared statements, like this one, but I 
wouldn't consider it a bug. Patches are welcome to improve it though.

- Heikki







view thread (3+ messages)

Message-ID: <419acdd8-a100-4cfb-a1e3-507da21d962c@iki.fi>
Permalink:  ../419acdd8-a100-4cfb-a1e3-507da21d962c@iki.fi/
Also on:    postgresql.org/message-id/419acdd8-a100-4cfb-a1e3-507da21d962c@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: hlinnaka@iki.fi, imchifan@mail.com
  Subject: Re: BUG #19862: Replacing a cast leaves prepared statements using the old cast function
  In-Reply-To: <419acdd8-a100-4cfb-a1e3-507da21d962c@iki.fi>
  References: <19862-084810a081ea79a3@postgresql.org> <419acdd8-a100-4cfb-a1e3-507da21d962c@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox