Continuing the discussion from How does the sorting work in a table?:
Currently (2018-04-10), Postgres default ordering is in effect for old and new database text columns. This creates work whenever order-dependent code has to move from database to Python or vice versa.
Going forward, I suggest that Python’s text ordering (Unicode, I believe) be used – or at least permitted – for all new text columns.