cms
cms copied to clipboard
AWS: do not depend on ordering of `UNION ALL`
Apparently neither postgres nor the SQL standard guarantees that the order of the results will match the order the of the queries0.
If the results are not returned in order, then AWS will confuse which result belongs to which query, producing incomprehensible results on the admin page.
~~I suppose queries
could be converted to be just a simple list now, but I have not tested that at all.~~
EDIT: done, tested a bit.
Hi @pobrn, thanks for the PR. I wonder if this is similar to what was implemented in #1201?
You're right. The linked PR seems to fix the same issue. In any case, it would good to merge either one because this came up during IOI2023 so a fix would be appreciated.
Please do note that the linked PR uses add_column
, which appears to be deprecated.