On Wednesday, May 26, 2021, 德哥 <digoal(at)126(dot)com> wrote:
>
> But in PostgreSQL 12, it works fine.
>
There may be some other stuff going on but your example relies on what is
undefined behavior. That some particular outcome matches your expectation
doesn’t make it correct. That said, a similar nearby complaint suggests
that this feature does have some issues. Whether the version 12 behavior
is deemed buggy and changed remains to be seen.
David J.