On Wed, Apr 29, 2026, at 8:27 AM, PG Bug reporting form wrote:
>
> Reproduction steps (minimal):
> BEGIN;
> CREATE TYPE foo AS (a int, b text);
> PREPARE p AS SELECT CAST(ROW(1, 'hello') AS foo)::text;
> EXECUTE p;
> ALTER TYPE foo ALTER ATTRIBUTE a TYPE VARCHAR(100);
> EXECUTE p;
> COMMIT;
>
Thanks for your report! The attached patch fixes this case. I included a
similar test case but I'm fine if the test is not included with this fix. I
decided to create a separate function instead of adding the new conditions to
record_plan_type_dependency() because it keeps the fix simple and isolated.
The crash is reproduced back to v11 which means this fix should be backpatched
to all supported versions.
--
Euler Taveira
EDB https://www.enterprisedb.com/