The following bug has been logged on the website:
Bug reference: 18449
Logged by: Alexander Lakhin
Email address: exclusion(at)gmail(dot)com
PostgreSQL version: 16.2
Operating system: Ubuntu 22.04
Description:
The following script:
CREATE TABLE t(a int, b varchar);
CREATE FUNCTION f(i int) RETURNS text LANGUAGE SQL
RETURN (SELECT b FROM t WHERE a = $1);
ALTER TABLE t ALTER COLUMN b TYPE text;
fails with:
ERROR: unexpected object depending on column: function f(integer)
on REL_14_STABLE .. master since e717a9a18.