Re: BUG #19862: Replacing a cast leaves prepared statements using the old cast function

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: imchifan(at)mail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19862: Replacing a cast leaves prepared statements using the old cast function
Date: 2026-11-11 12:58:48
Message-ID: 419acdd8-a100-4cfb-a1e3-507da21d962c@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2026-11-11 13:09:08 BUG #19878: pg_identify_object functions expose XX000 for unsupported class IDs
Previous Message Kirill Reshke 2026-11-11 12:56:05 Re: BUG #19862: Replacing a cast leaves prepared statements using the old cast function