Dear community,
we have in our system some legacy SQL statements that contain something like ... ORDER BY ltree2text(page_order)::integer ...
, where the page_order column contains "ltree values" such as "123.456.789".
We are currently seeing errors where PostgreSQL complains about not being able to cast these values to integer, which seems perfectly sensible.
The strange thing is, that this code is around for many years; so I am wondering, if [a] we simply were lucky all the time (all values were integers) or if, for example, [b] the ltree2text function has changed in recent versions of PostgreSQL or something like that...
Is my assumption that we were lucky and that the code should simply be changed to ... ORDER BY page_order ...
correct?