Re: BUG #19903: ALTER COLUMN TYPE: "unexpected object depending on column" internal error via partition key

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: hackerzheng666(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: BUG #19903: ALTER COLUMN TYPE: "unexpected object depending on column" internal error via partition key
Date: 2026-11-16 23:01:01
Message-ID: CA+Tgmobcs8YFVgoKOt8+QLYxYXEfE4RsHZyjw8vauuy5ZyUE7g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Nov 16, 2026 at 5:53 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> Maybe I'm just tired, but that's not something anybody actually cares about
> right? I guess we can dress this up to have a nicer error message, but also,
> who cares?
>
> I think we want to do something here, it might be better to focus on rejecting
> such absurd partition by clauses...

The LLM-generated patch I attached before gives a nice error message
for ALTER COLUMN TYPE, which I agree is nice but not critical, but it
also makes ALTER COLUMN .. SET EXPRESSION succeed instead of failing.
If that case is safe, we probably want to allow it.

--
Robert Haas
Databricks

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2026-11-16 23:28:21 Re: 16.16: join order regression for pg_indexes self-join (schema filter applied last), ~50x slower than 16.15
Previous Message Andres Freund 2026-11-16 22:53:49 Re: BUG #19903: ALTER COLUMN TYPE: "unexpected object depending on column" internal error via partition key