Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
> It seems to me possible that a cast calls a wrong function and
> leads to a crash.
I don't see a good reason to think that a crash is possible.
> But I don't come up with a good way to fix
> this, but applying a part of the patch 04fe805a17 on 11(.2) seems
> working.
FWIW, I intentionally did not back-patch 04fe805a17. I judged
that before the domain-related changes in that patch, such cases
wouldn't come up often enough to justify inserting poorly-tested
code into the back branches. I still think that.
regards, tom lane